note 101417 rejected from language.expressions by danbrown
| From: | danbrown@php.net | Date: | Wed, 15 Dec 2010 17:31:24 +0000 |
| Subject: | note 101417 rejected from language.expressions by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174949@lists.php.net to get a copy of this message | ||
Note Submitter: glamrani at gmail dot com
----
I wanna replace some undesirable characters on a string, the code witch i wrote doesnât work,
can you help please?
The code is:
for ($i=0;$i<strlen($content);$i++)
{
$caractere=$content[$i];
$ascii=ord($caractere);
if(!(48 <= $ascii <= 57) && !(64 <= $ascii <= 90) && !(96 <=
$ascii <= 122) && !(128 <= $ascii <= 154) && !(160 <= $ascii <= 165)
&& ($ascii != 173))
{
$content[$i]=" ";
}
}
echo $content;