breaking apart data
| From: | Larry R. Sieting | Date: | Tue, 20 Jan 2004 16:06:07 +0000 |
| Subject: | breaking apart data | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32520@lists.php.net to get a copy of this message | ||
HEllo,
I have some data stored in a database (mysql) that I need to break apart. When I display it, I use the nl2br function.. works fine...
but I want to do some formatting to each line of text and need to break it apart.
when I look at the raw data, it has the escape sequence \r\n (return\linfeed)
what would be the most efficient way to rework this data in to what I am after....
stored text:
asdf asdf sadl jf lsakdjf a \r\n asdfierw aweiufasd asiuwr \r\n asdhfauiweuhrahsd \r\n
displays text as:
asdf asdf sadl jf lsakdjf a
asdfierw aweiufasd asiuwr
asdhfauiweuhrahsd
I would like to highlight parts of the above.
Larry R. Sieting