note 14341 added to function.htmlentities.php

From: Date: Fri, 27 Jul 2001 06:03:56 +0000
Subject: note 14341 added to function.htmlentities.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15896@lists.php.net to get a copy of this message
To convert more characters to their equivalents, just use this: function print_processor($value) { $whats_coming_out = array("]","[","!","\"","$","%","'","(",")","{","}","-",";","\\","/","<",">","*","+",".",":","_","=","^","\,","|"," ","?"); $whats_going_in = array("&#93","&#91","&#33","&#34","&#36","&#37","&#39","&#40","&#41","&#123","&#125","&#45","&#59","&#92","&#47","&#60","&#62","&#42","&#43","&#46","&#58","&#95","&#61","&#94","&#130","&#124","&nbsp","&#63"); for ($i=0;$i<count($whats_coming_out);$i++) { $value = str_replace ($whats_coming_out[$i], $whats_going_in[$i], $value); } return $value; } http://www.php.net/manual/en/function.htmlentities.php

« previous php.notes (#15896) next »