Posted On: Feb 22, 2018
You can use count() function to count the number of elements in a PHP Array.
$array=['ram','ravi','ajay','vijay']; echo count($array); // outputs 4
Never Miss an Articles from us.
array_combine() is used to creates a new array by using the key of one array as keys and using the value of another array as values. Whereas array_merge() merges one or more than one array such that t...