note 89371 added to function.html-entity-decode

From: Date: Wed, 04 Mar 2009 23:33:37 +0000
Subject: note 89371 added to function.html-entity-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-151491@lists.php.net to get a copy of this message
I created this function to filter all the text that goes in or comes out of the database. function filter_string($string, $nohtml='', $save='') { if(!empty($nohtml)) { $string = trim($string); if(!empty($save)) $string = htmlentities(trim($string), ENT_QUOTES, 'ISO-8859-15'); else $string = html_entity_decode($string, ENT_QUOTES, 'ISO-8859-15'); } if(!empty($save)) $string = mysql_real_escape_string($string); else $string = stripslashes($string); return($string); } ---- Server IP: 208.69.120.35 Probable Submitter: 74.255.203.86 ---- Manual Page -- http://www.php.net/manual/en/function.html-entity-decode.php Edit -- https://master.php.net/note/edit/89371 Del: integrated -- https://master.php.net/note/delete/89371/integrated Del: useless -- https://master.php.net/note/delete/89371/useless Del: bad code -- https://master.php.net/note/delete/89371/bad+code Del: spam -- https://master.php.net/note/delete/89371/spam Del: non-english -- https://master.php.net/note/delete/89371/non-english Del: in docs -- https://master.php.net/note/delete/89371/in+docs Del: other reasons-- https://master.php.net/note/delete/89371 Reject -- https://master.php.net/note/reject/89371 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151491) next »