I have an array result like this,
example 1:
Array ( [0] =>15 [1] => 16 [2] => 17 [3] => 18 )
example 2:
Array ( [0] =>15 [1] => 16 [2] => 17 [3] => 18 [4] => 18 )
The first array ends at array[3]
The second array ends at array[4]
How to calculate where the array ends
Is there any function to calculate this
(Directly copied from http://www.php.net/manual/en/function.count.php)
Depending on what do you mean by “end”,
For a normal array, just use
count($a) - 1.