Re: ctype second opinions
| From: | Alan Knowles | Date: | Fri, 19 Jul 2002 14:56:35 +0000 |
| Subject: | Re: ctype second opinions | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7786@lists.php.net to get a copy of this message | ||
The whole of the logic that I am trying to convey here similar to: $string = 'This is a string'; $i = 0; while ($string[$i] != '') {should you be using $string{$i} ?? - cant remember the story on that but at one point it used to issue a warning if you used [] on a string. regards alan
$token = ''; while (strlen($string[$i]) && ctype_alpha($string[$i]) { $token .= $string[$i]; ++$i; } $tokens[] = $token; ++$i; } Wit