see nl2br(). You might also want to convert spaces to 's On Fri, 9 Aug 2002, Kristoffer Strom wrote:
> Ok, this is totally newbie but I just started messing around with PHP after > programming IBM's NetData for a while. > > My first big problem I haven't been able to solve myself is how to format > the result of an SQL query into HTML code. > In the (MySQL) database, I have one field for very long texts. One test > entry looks like this: > -------------------------- > test > > test > > test > -------------------------- > But when printing the result, even with HTMLENTITIES and HTMLSPECIALCHARS, > just looks like: > ------------------------- > test test test > ------------------------- > > How do I convert the result to HTML code, I especially want the linebreaks!! > > The answer is probably very simple.... > > /Kris > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php