Re: ASCII Chars Only
| From: | Richard Collyer | Date: | Sat, 03 Jun 2006 15:59:03 +0000 |
| Subject: | Re: ASCII Chars Only | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237329@lists.php.net to get a copy of this message | ||
Rabin Vincent wrote:
On 6/3/06, Richard Collyer <richard@firebadger.net> wrote:Doh! I am indeed a spanner. Thanks. Cheers RichardHello, Trying to get the following working. I am trynig to select only ASCII characters (not extended ASCII) so that if the string contains characters outside the 32 - 126 range of "good" characters then $Discard is returned as > 0. But it is going overboard telling me that every character is bad :( Ideas? Cheers RichardThat should be $str, not $test. Rabin$test = "飯島真ç†as";function non_ascii($str) { $Discard = 0;for ($i=0; $i < strlen($str); $i++) { $char = ord($test{$i});