Here is a linear (fastest) solution:
end($a);
$last_id=key($a);
More Related Contents:
- How do you reindex an array in PHP but with indexes starting from 1?
- How to Remove Array Element and Then Re-Index Array?
- PHP reindex array? [duplicate]
- Re-index numeric array keys [duplicate]
- PHP create new array by value
- Get first and second element of array [duplicate]
- PHP Multidimensional associative array to HTML table
- count how many duplicate keys are in array of objects?
- Is there a function to extract a ‘column’ from an array in PHP?
- How to add elements to an empty array in PHP?
- PHP Sort Array By SubArray Value
- Using a string path to set nested array data [duplicate]
- I have an array of integers, how do I use each one in a mysql query (in php)? [duplicate]
- How to get random value out of an array?
- Finding the subsets of an array in PHP
- How to combine two arrays together?
- How can I echo or print an array in PHP?
- Get min and max value in PHP Array
- Search and replace multiple values with multiple/different values in PHP5?
- PHP Recursively unset array keys if match
- $_POST max array size
- Group 2d array rows by one column and sum another column [duplicate]
- PHP: Get the key from an array in a foreach loop [duplicate]
- Group 2d array data by one column and sum other columns in each group (separately)
- Efficiency of using foreach loops to clear a PHP array’s values
- Find min/max in a two dimensional array
- how to sort a multidemensional array by an inner key
- CMS Routing in MVC
- Recursive array_search
- Check if all values in array are the same