note 30252 modified in function.count by danbrown
| From: | danbrown@php.net | Date: | Fri, 09 Jan 2009 23:02:20 +0000 |
| Subject: | note 30252 modified in function.count by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149016@lists.php.net to get a copy of this message | ||
Note:
<?php
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.
--was--
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://php.net/manual/en/function.count.php