Re: PHP and XML->allowing (X)HTML

From: Date: Sat, 26 Apr 2003 23:15:53 +0000
Subject: Re: PHP and XML->allowing (X)HTML
Groups: php.windows 
Request: Send a blank email to php-windows+get-19640@lists.php.net to get a copy of this message
Davy, Should you be storing the <br> tags in the database? Why not do the nl2br function just before you display the text. As in.... echo nl2br($sometext); >Helloo People, > >I am currently working on a XML driven website with PHP. I have a slight >annoying problem though... >I want my users of the content managment to be able to use some XHTML >tags in thier text, and i want to use the nl2br() function so that every >\n is converted to <br />. This seems to work, cos in my database i do >see those <br /> tags. When i get the articel from the database and >build XML, then use XSLT to convert the output i get <br /> tags >displayed in my text ( &lt;br /&gt; in my HTML source ).. this drives >me nutty, i hope someone can help me with this, Thanks in advance... > >Best regards, > >Davy Obdam > >

« previous php.windows (#19640) next »