Reply to Re: Replace in PHP

Your name:

Reply:


Posted by Joe Molloy on 01/26/06 19:30

check out the nl2br function which replaces linefeed characters with
linebreak tags or the str_replace function which works like the replace
function in VB.

Joe

"John K" <kinane3@yahoo.com> wrote in message
news:1138291525.377909.143800@g43g2000cwa.googlegroups.com...
> I'm new to PHP and come from and ASP background...
>
> I want to replace line feeds in user submited textareas with <br> or
> <p> or <div>. In ASP I do this to replace carriage return/line feeds
> with <p> in a record of a recordset...
>
> Replace(rsWhatever("fld_whatever_field"), vbCrLf, "<p>")
>
> I don't know how to accomplish this in PHP. I know I have to use
> str_replace() but I'm confused by the syntax.
>
> Thanks for the help!
>

[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

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