note 101417 added to language.expressions
| From: | glamrani at gmail dot com | Date: | Wed, 15 Dec 2010 13:03:03 +0000 |
| Subject: | note 101417 added to language.expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174945@lists.php.net to get a copy of this message | ||
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;
----
Server IP: 69.147.83.197
Probable Submitter: 196.12.232.146
----
Manual Page -- http://www.php.net/manual/en/language.expressions.php
Edit -- https://master.php.net/note/edit/101417
Del: integrated -- https://master.php.net/note/delete/101417/integrated
Del: useless -- https://master.php.net/note/delete/101417/useless
Del: bad code -- https://master.php.net/note/delete/101417/bad+code
Del: spam -- https://master.php.net/note/delete/101417/spam
Del: non-english -- https://master.php.net/note/delete/101417/non-english
Del: in docs -- https://master.php.net/note/delete/101417/in+docs
Del: other reasons-- https://master.php.net/note/delete/101417
Reject -- https://master.php.net/note/reject/101417
Search -- https://master.php.net/manage/user-notes.php