note 57106 deleted from function.str-replace by bjori

From: Date: Sun, 26 Mar 2006 22:22:51 +0000
Subject: note 57106 deleted from function.str-replace by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106670@lists.php.net to get a copy of this message
Note Submitter: mark meves (mavis) ---- please note in the last post by dsi, for escaping text to be XHTML compliant, this would be better served by the functions: htmlentities() htmlspecialchars() no? in the previous post by dominicshaw, escaping text for insertion in to a database, use addslashes() addcslashes() (or see the PEAR::DB solution) no? aeron's text-to-image replacement (may '04) might be better served by preg_replace(): $s = preg_replace('/([0-9])/','<img src="\1.gif"></img>'); // not tested t at seebach dot dk (oct '03) needle-highlighting will break when invalid characters (special regex characters) are present in the search string. for this we need a preg_escape() function. please see preg_match() for that. and no, i don't have anything better to do. -code till dawn, mark meves my email is my first name dot my last name at gmail dot com. and yes, i write regexs for fun.

« previous php.notes (#106670) next »