note 29793 deleted from function.sizeof by didou
| From: | didou@php.net | Date: | Wed, 15 Oct 2003 17:29:35 +0000 |
| Subject: | note 29793 deleted from function.sizeof by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58650@lists.php.net to get a copy of this message | ||
Note Submitter: jt@tsw.org.uk
----
Ok, blatently obvious BUT it might stump some people (it had me scratching my head, before kicking
myself over the stupidity...)
$foo = "lalalallalaa this is some text lalala";
echo sizeof($foo);
this will print a 1 .... sizeof does not do string lengths - use strlen:
$foo = "lalalallalaa this is some text lalala";
echo strlen($foo);