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 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 array […]
This tutorial was added to PHP.

PHP Array Extract

July 30, 2013
We have seen about PHP string extract few days before, to get particular portion of given input string using PHP in built 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 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 from […]
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 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. count() […]
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 variety 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 string or array data from one another and these are complement to each other. PHP Implode implode() function accepts a separator and an array as its parameter. It combine each of the array elements whereas the combined elements […]
This tutorial was added to PHP.

PHP Arrays

April 15, 2013
Arrays are very interesting part of PHP programming. And also, they are very powerful compound type in PHP. As like as other programming languages, arrays can be classified as indexed array and associative array. And, it can further be classified as one dimensional and multi dimensional array, based on the level of array index. In […]
This tutorial was added to PHP.

↑ Back to Top