Reply to Re: How to detect a line break in a multiline textfield

Your name:

Reply:


Posted by Ciaran on 02/28/07 14:30

Thanks for the reply Hendri. I got it sorted out using a simple find
and replace I found by searching for nl2br thanks to your second
post.

Converting textarea line breaks to <br> in PHP
$result = str_replace(array("\r\n", "\r", "\n"), "<br />",
$thestring);

Converting <br> to textarea line breaks in PHP:
$result= str_replace(array("<br/>", "<br>", "<br />"), "\n",
$thestring);

Hope this helps someone,
Ciarán

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация