You are here: Replace the CR/LF in a textarea by str_replace « PHP Programming Language « IT news, forums, messages
Replace the CR/LF in a textarea by str_replace

Posted by Wayne on 06/06/06 22:58

$a = $_POST['txt_content']; # txt_content = This is a<CR><LF>Test
$p = str_replace ("%0D%0A", "<br>", $a);

That is the above code that I am using, however, it is not picking up
the CR/LF from the textarea. I have also attempted singular variations
of the CR/LF combination and even reversed the sequence without success.

Is it possible that it may be encoded differently and if so what is it?

Thanks
Wayne.

 

Navigation:

[Reply to this 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

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