note 87936 modified in function.chr by danbrown

From: Date: Wed, 31 Dec 2008 18:53:57 +0000
Subject: note 87936 modified in function.chr by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148723@lists.php.net to get a copy of this message
This function creates a ascii table, and replaces all the ascii characters in the mail. --- Deze functie maakt een ascii tabel, en zet alles juist om. <?php function makeASCII($a){ $find[] = "=\r\n"; $replace[] = ""; for($i=0; $i < 256; $i++){ $find[] = "=".dechex($i).""; $replace[] = chr($i); } $a = str_replace($find,$replace,$a); return $a; } ?> --was-- <? function makeASCII($a){ $find[] = "=\r\n"; $replace[] = ""; for($i=0; $i < 256; $i++){ $find[] = "=".dechex($i).""; $replace[] = chr($i); } $a = str_replace($find,$replace,$a); return $a; } ?> This function creates a ascii table, and replaces all the ascii characters in the mail. --- Deze functie maakt een ascii tabel, en zet alles juist om. http://php.net/manual/en/function.chr.php

« previous php.notes (#148723) next »