Re: Newbie question about SQL result formatting
| From: | Philip Hallstrom | Date: | Fri, 09 Aug 2002 21:09:58 +0000 |
| Subject: | Re: Newbie question about SQL result formatting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111895@lists.php.net to get a copy of this message | ||
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
>