Tag Archives — Arrays

Remove or Delete a Specific Element from an Array in JavaScript

There are a lot of situations in which you might want to delete or remove a given element from an array. For example, you might be storing the id of different users playing a game in an array and once they are out, you will have to remove the id of that particular player. Similarly, […]

Insert Element(s) at Specific Position in an Array in JavaScript

In one of my previous posts, I mentioned different ways to remove or delete a specific element from an array in JavaScript. When manipulating arrays, the need to insert elements at a specific index is just as common. There are multiple ways to insert elements into an array. Each of these methods has its own […]

How Can I Remove or Delete Empty Array Elements in PHP?

Many times, when working on a PHP project, you deal with an array which has some unwanted or empty array elements. This is especially true if you have no control over the values populated into the array. For example, you might have to store user input into an array and some of that input might […]

How can I Delete an Element from an Array in PHP?

Let’s say you have an array and you want to delete one or more elements from that array using PHP. Maybe you have to delete an element with a specific value or maybe you have to delete multiple consecutive elements. In this article, you will learn about different inbuilt PHP functions that can help you […]

0%