razorlegacy Posted January 9, 2007 Share Posted January 9, 2007 I created a database where all inserts were inserted straight into the database.ex This is inserted exactly like this[code]<b>review</b> don't "want"<br>[/code]How can I retrieve from the DB and change <,>,',",& into XHTML compliant variables???I am currently using[code]$find = array ('/<br>/','/</','/>/');$replace = array ('<br />','<','>');$review = language_filter($row_HellHorror['review']);echo preg_replace ($find, $replace, $review);[/code] Link to comment https://forums.phpfreaks.com/topic/33416-converting-to-xhtml/ Share on other sites More sharing options...
razorlegacy Posted January 9, 2007 Author Share Posted January 9, 2007 Just thought about this.Does collation in the DB have anything to do with this?? My collation is utf8_unicode_ci Link to comment https://forums.phpfreaks.com/topic/33416-converting-to-xhtml/#findComment-156344 Share on other sites More sharing options...
razorlegacy Posted January 9, 2007 Author Share Posted January 9, 2007 bump Link to comment https://forums.phpfreaks.com/topic/33416-converting-to-xhtml/#findComment-156879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.