note 17832 added to function.count
| From: | b23 at php2 dot chek dot com | Date: | Thu, 27 Dec 2001 21:40:44 +0000 |
| Subject: | note 17832 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23891@lists.php.net to get a copy of this message | ||
BE CAREFUL! when you execute fonction array_splice() to delete a line of an array, if the line is
the last one of this array, count() fonction on this returned array will return value 1 and not 0 !!
e.g.:
$broum[] = "broum";
echo count($broum); // will output "1".
$broum = array_splice($broum,0,1);
echo count($broum); // will output "1" !!!
So be careful...
--
http://www.php.net/manual/en/function.count.php
http://master.php.net/manage/user-notes.php?action=edit+17832
http://master.php.net/manage/user-notes.php?action=delete+17832
http://master.php.net/manage/user-notes.php?action=reject+17832