note 22765 added to function.chr
| From: | php-general at lists dot php dot net | Date: | Sat, 29 Jun 2002 00:05:45 +0000 |
| Subject: | note 22765 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32389@lists.php.net to get a copy of this message | ||
This bit of code will convert all those lovely tilde,umlaut etc. etc. characters into safe character
codes:
$trans_array = array();
for ($i=127; $i<255; $i++) {
$trans_array[chr($i)] = "&#" . $i . ";";
}
$outtext = strtr($intext, $trans_array);
--
http://www.php.net/manual/en/function.chr.php
http://master.php.net/manage/user-notes.php?action=edit+22765
http://master.php.net/manage/user-notes.php?action=delete+22765
http://master.php.net/manage/user-notes.php?action=reject+22765