note 22765 deleted from function.chr by googleguy

From: Date: Mon, 11 Feb 2013 05:15:36 +0000
Subject: note 22765 deleted from function.chr by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193586@lists.php.net to get a copy of this message
Note Submitter: ---- This bit of code will convert all those lovely tilde,umlaut etc. etc. characters into safe character codes: <?php $trans_array = array(); for ($i=127; $i<255; $i++) { $trans_array[chr($i)] = "&#" . $i . ";"; } $outtext = strtr($intext, $trans_array); ?>

« previous php.notes (#193586) next »