note 30252 added to function.count
| From: | admin at lft-muenchen dot de | Date: | Wed, 12 Mar 2003 10:18:13 +0000 |
| Subject: | note 30252 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45139@lists.php.net to get a copy of this message | ||
Note:
print (strlen($a)); // will print 0
$a="";
print (strlen($a)); // will print 1
$a=null;
print (strlen($a)); // will print 1
$a=array();
print (strlen($a)); // will print 0
you can only get an array back to size 0 by using the array() command, not by just setting it to
"" or null.
--
http://www.php.net/manual/en/function.count.php
http://master.php.net/manage/user-notes.php?action=edit+30252
http://master.php.net/manage/user-notes.php?action=delete+30252
http://master.php.net/manage/user-notes.php?action=reject+30252