How to search for \n in a textarea field

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chitrapu
Forum Newbie
Posts: 23
Joined: Sun Jan 14, 2007 11:39 pm

How to search for \n in a textarea field

Post by chitrapu »

hiiiiiii,
I need to know how we can search if the text in a text area contains a \n character,
how is it posibble.Please reply fast, its of high priority
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Code: Select all

$pos = strpos($mystring, "\n");
if ($pos !== false) {
     // found!
}
(#10850)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Is this related to viewtopic.php?t=64740 ?
Post Reply