Re: A simple question, however it's urgent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-05-17 at 15:26 +0300, Andre Polykanine wrote:

> Hello everyone,
> Just can't imagine what happens. There is the simplest function in the
> world:
> 
> function LineBreaks ($str) {
> $what=array("\r\n", "\n", "\r");
> $with=array("<br>");
> $str=str_replace($what, $with, $str);
> return $str;
> }
> 
> And... it does work on one site and doesn't on another. Same hosting
> provider, same settings, all the same.
> When I call
> $_POST['uwork']=LineBreaks($_POST['uwork']);
> Nothing happens. Yes, it does see \r\n's but it doesn't replace them
> with <br>'s. Tried built-in nl2br(), but no result...
> Thank you!..
> 
> -- 
> With best regards from Ukraine,
> Andre
> Http://oire.org/ - The Fantasy blogs of Oire
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: http://twitter.com/m_elensule
> 
> 


If nl2br() doesn't even work, are you really sure that those character
exist in the string? Just for our own sake, could you demonstrate how
you determine that the carriage return and line break characters exist
in the string?

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux