Hello Michael,

It's perfectly true, '\n' doesn't work
it could have taken me days to find that!

I also found a php function nl2br($body) which does the same thing

thank you all

Manu



On 4 déc, 08:47, 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