note 36107 deleted from function.strlen by dave
| From: | dave@php.net | Date: | Fri, 05 May 2006 03:23:40 +0000 |
| Subject: | note 36107 deleted from function.strlen by dave | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-110600@lists.php.net to get a copy of this message | ||
Note Submitter:
----
> a little modification of rasmus solution
>
> $tmp=0; $s="blah";
> while($c=$s[$tmp++]) { echo $c; }
>
> but what happens when the string contains zeros?
> $s="blah0blah";
> the script stops....
Then use this:
<?php
$tmp=0; $s="blah0blah";
while( ord($c = $s[$tmp++]) )
echo $c;
?>