array_key_last(): to get the last key of an array
PHP 7.3.0 Supported by PHP 7.3.0 and above
Example 1
Output is here
Note that the first key is 0 , so the last key in above code is 4
Example 2
The output is here
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
![]() | ||||