php - Capture newline from a textarea input -


i have textarea form in html. if user hits enter between 2 sentences data should carried on php.

currently if user enters:

apple google ms 

and php code is:

$str = $_post["field"];  echo $str; 

i

apple google ms  

as output. want output this

apple google ms 

what should do?

try nl2br() instead:

echo nl2br($str); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -