Alternatively, you could wrap the output in <pre></pre> tags.

On Dec 4, 9:30 am, manu <[EMAIL PROTECTED]> wrote:
> thanks Michael,
>
> I could have searched that for ages.
> and nl2br() is just fine too
>
> Best regards
>
> Manu
>
> On 4 déc, 10:24, grigri <[EMAIL PROTECTED]> wrote:
>
> > What's wrong with nl2br() ?
>
> > On Dec 4, 7:47 am, schneimi <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I think your problem is the '\n', because that way the line feed
> > > doesn't get interpreted, try it with "\n" instead.
>
> > > Best regards,
>
> > > Michael
>
> > > manu schrieb:
>
> > > > Hello all,
>
> > > > I'm new to cake (and php btw).
> > > > I'm looking for a way to format a plain textarea text in html. I don't
> > > > want to use an html editor, but just want something like this:
>
> > > > <?php echo str_replace('\n','<br />', $body); ?> but it doesn't work.
>
> > > > Is there a cake helper, or method which could do that? Is there
> > > > another php way to do it?
>
> > > > Thanks for helping
>
> > > > Manu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to