Re: text formatting
| From: | James, Yz | Date: | Thu, 19 Apr 2001 20:13:51 +0000 |
| Subject: | Re: text formatting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49414@lists.php.net to get a copy of this message | ||
Hi George,
Yes. Use nl2br(); which converts line breaks (\n) to html break tags
(<BR>). You're better doing it when you pull data out of your database
rather than doing it as it goes in (if you're using a database in the first
place).
Format is as follows
:
$string = nl2br($string);
James.
> I have a text area which the client types information into, but is it
> possible to format the text for example if the user hits enter ,then it
will
> place a line break there,
>
>
> TIA
>
> george
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>