note 3134 deleted from function.sizeof by jimw

From: Date: Wed, 03 Apr 2002 18:58:24 +0000
Subject: note 3134 deleted from function.sizeof by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28561@lists.php.net to get a copy of this message
If some elements in your array are not set, then sizeof() and count() will not return the index of the last element, but will return the number of set elements. To find the index of the last element in the array: end($yourArray); $index = key($yourArray); ... Where $yourArray is the array you want to find the last index ($index) of.

« previous php.notes (#28561) next »