PHP Arrays

Recent Tutorial

PHP JSON Array Merge

May 14, 2015
In this tutorial, we are going to see about how to merge two or more JSON string. This can be done by decoding given JSON objects and encoding after the merge. In this example, we are having two JSON objects to merge together. These objects will be decoded into an associative array and encoded after […]
This tutorial was added to PHP.

PHP array_intersect

November 25, 2013
PHP array_intersect() function is used to find intersection between arrays. This function can accept multiple arguments to compare. After comparison, this function returns an array of intersecting elements that are commonly available in all the given input arrays. array_intersect() is the reverse of PHP array_diff() which returns the elements that are not in the arguments. […]
This tutorial was added to PHP.

PHP in_array

August 22, 2013
PHP Arrays, one of the interesting topic in PHP, in learning part of a view, since, it includes several direct PHP functions to work with arrays. In this article, we took one of those functions, PHP in_array(), to learn about it in detail. In PHP, in_array() is used to check whether a value or sub […]
This tutorial was added to PHP.

PHP Array Extract

July 30, 2013
We have seen about PHP string extract few days before, to get a particular portion of given input string using PHP inbuilt functions, like, substr(), mb_substr() and etc. And now, we are going to see another PHP function to extract given associative array. This function is named as extract(), that is, for extracting each of […]
This tutorial was added to PHP.

PHP Array Difference

July 18, 2013
Among the huge list of PHP array functions, we are going to see about some of them used in finding differences between given input arrays. By using PHP array difference functions, we can find differences between arrays with respect to their keys or values. Some basic PHP array difference functions are, array_diff array_diff_key array_diff_assoc Apart […]
This tutorial was added to PHP.

PHP Array Length

June 21, 2013
In PHP, the total number of elements in an array can be calculated by a couple of PHP functions count() and sizeof(), where as the sizeof() is an alias of the master function count(). We are going to see about these functions in this article in detail with suitable examples for calculating PHP array length. […]
This tutorial was added to PHP.

PHP Array Sort

June 16, 2013
PHP includes powerful array functions which are quite interesting and very useful for working with. For example, array_keys(), array_values, implode() and explode() and etc. On this list, sorting functions are one of the important set of functions to be known. Sorting an array that includes several varieties of conditions based on which the group of […]
This tutorial was added to PHP.

PHP Implode Explode

May 30, 2013
PHP implode() and explode() are the couple of popularly used string functions. Both are used to convert a string or array data from one another and these are a complement to each other. PHP Implode implode() function accepts a separator and an array as its parameter. It combines each of the array elements whereas the […]
This tutorial was added to PHP.

PHP Arrays

April 15, 2013
An Array is a PHP datatype used to store a group of data into a variable. Each array item is stored as a key and value pair. Arrays are classified as “indexed array” and “associative array” based on the key specification. The Indexed array has default index starts with ‘0’ and the associative array contains the user-defined key index. […]
This tutorial was added to PHP.

↑ Back to Top