I know this doesn't answer the question, but if you integrate tinymce
it will make your textarea look like MS Word and format the text into
html accordingly.

try changing $body to $this->data['ModelName']['nameOfFormField']
(adjusting ModelName and nameOfFormField respectively)

On Dec 3, 6:06 pm, manu <[EMAIL PROTECTED]> wrote:
> 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 cake-php@googlegroups.com
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