note 111555 added to function.end
| From: | Malko | Date: | Sun, 03 Mar 2013 23:04:24 +0000 |
| Subject: | note 111555 added to function.end | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193788@lists.php.net to get a copy of this message | ||
<?php
// regarding "Tim C" comment doing
$lastkey = array_pop(array_keys($arr));
// this is effectively an easy way but not a correct one at all regarding performance, a correct
way would be more to do something like that:
end($arr);
$lastKey = key($arr);
----
Server IP: 69.147.83.199
Probable Submitter: 82.216.61.196
----
Manual Page -- http://php.net/manual/en/function.end.php
Edit -- https://master.php.net/note/edit/111555
Del: integrated -- https://master.php.net/note/delete/111555/integrated
Del: useless -- https://master.php.net/note/delete/111555/useless
Del: bad code -- https://master.php.net/note/delete/111555/bad+code
Del: spam -- https://master.php.net/note/delete/111555/spam
Del: non-english -- https://master.php.net/note/delete/111555/non-english
Del: in docs -- https://master.php.net/note/delete/111555/in+docs
Del: other reasons-- https://master.php.net/note/delete/111555
Reject -- https://master.php.net/note/reject/111555
Search -- https://master.php.net/manage/user-notes.php