Hi
I know we can use function explode to devide texts/strings into peices. And i know we use ln2br() to show line breaks when pulling out a text from the database.
what i need is exploding a text on line breaks.
to be more specific, users enter their keyword in a textarea and type each phrase in 1 line. I save that textarea content in 1 field but since I need to analize each phrase, I want to devide that text into keyword phrases when i use SELECT to pull it out
how can I do that?
thanks
explode line breaks
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
$lines = explode(PHP_EOL, $content);
echo '<pre>';
print_r($lines);- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am