Blog – Masonry

PHP

How to get numeric index of associative array in php?

The array_keys() function is an inbuilt function in PHP which is used to return either all the keys of an array or the subset of the keys.

PHP

How to remove a key and its value from an associative array in php?

Using unset() function: The unset() function is used to unset a key and its value in an associative array in php.

PHP

Difference between indexed array and associative array in php?

An array is a collection of objects that contain a group of variables stored under the same name. All the elements belong to the same data type, i.e. string, integers, or lists. Keys are unique in the case of both indexed and associative arrays.

PHP

How to remove special character from string in php?

In this post,we will leran you how to remove special character from string in php.

PHP

difference between isset() and array_key_exists() function in php?

The main difference between isset() and array_key_exists() function is that the array_key_exists() function will definitely tells if a key exists in an array.

PHP

How to use array_map() function in php?

The array_map() function returns an array containing the results of applying the callback to each value of the array used as arguments for the callback.

PHP

How to use array_reduce() function in php?

array_reduce() Method: As the name suggests, an array_reduce() function reduces the array to a single value by performing the given operation. The array_reduce() applies the callback function to the elements of the array and gives output as a single value.

PHP

How to use array_walk() function in php?

array_walk() Method: It applies a user-defined function to every member of an array. The array’s keys and values are parameters in the function. The array_walk() function is not affected by the internal array pointer of the array.

PHP

difference between array_merge() and array_combine() functions in php?

In this post, we will show you difference between array_merge() and array_combine() functions in PHP