...

View Full Version : Formatting data returned



holty
01-05-2004, 03:28 PM
All

I have a field named Address in my database.

When i return the contents of this field it comes out in one long string. If i put it in a text area it formats it correctly - puts in carriage returns....

How can I get the same results as the textarea without using a text area? - i.e. just display it ....

Thanks

Nightfire
01-05-2004, 03:42 PM
<?php
$str = nl2br($str);
echo $str;
?>

http://www.php.net/nl2br

holty
01-05-2004, 03:58 PM
cheers

thats nice and easy!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum