dTechNotes
Thursday, November 7, 2019
PHP - Get last element from array
//array is called here $arrayVariable
$lastElement=end($arrayVariable);
Example:
If $arrayVariable=["apple","pear","peach","cherry"], the function above is to return cherry.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment