over 9 years ago
Hello Reader! Getting last the key index of any array PHP can be done on several ways as follows:-
Lets consider an example array $MyArray
Using this syntax your pointer will move to the last index on your array $MyArray.
Now you can take the last element of you array once get by you pointer above
Now you just need to print that value
Now this is much more easy syntex:-
Here above we can directly get the to the last key by using count -1,and you will get the element on last key.
0 Comment(s)