Jump to content

Converting to XHTML


razorlegacy

Recommended Posts

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>/','/&lt;/','/&gt;/');
$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.