note 80567 deleted from function.htmlentities by danbrown

From: Date: Sun, 17 May 2009 16:51:58 +0000
Subject: note 80567 deleted from function.htmlentities by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154902@lists.php.net to get a copy of this message
Note Submitter: iraiscoming [AT] g m a i l [DOT] com ---- As "realcj at g mail dt com" wrote in a comment for flashentities, here's an "extension" for reading wordpress cookies and using the addresses and e-mails in them: <?php function wp_entities($string, $encode = 0){ $a = (int) $encode; $original = array("&","'",":","/","@"); $entities = array("%26","%27","%3A","%2F","%40"); if($a == 1) return str_replace($original, $entities, $string); else return str_replace($entities, $original, $string); } ?> Just set the second argument to 1 (int) to make the function act the opposite way. :) Hope it will be useful!

« previous php.notes (#154902) next »