NYCPHP Meetup

NYPHP.org

[nycphp-talk] Textarea formatting

Ben Sgro (sk) skyline at publicmine.com
Thu Oct 19 14:10:54 EDT 2006


Felix, 

Sure, that is helpful, but what about tabs, lists and all the other elements that could exist in an email message.
I'm looking for a canned function or class that will do the work.

Thanks.

- Ben

....some code.....
$details   = str_replace("\n\r", "<br>", $cellSet[0]['info']);

  ----- Original Message ----- 
  From: Felix Shnir 
  To: NYPHP Talk 
  Sent: Thursday, October 19, 2006 1:24 PM
  Subject: Re: [nycphp-talk] Textarea formatting


  Well, if you are talking about displaying in HTML then you should replace \n\r with a <br>

  Felix.



  On 10/19/06, Ben Sgro (sk) < skyline at publicmine.com> wrote:
    Hello all,

    I have a textarea field that can .. store text. 

    I'm using it to save emails for example w/a form.
    I grab the posted data and call addslashes( ) then stick it into the
    database, varchar(1024). (this is a calendar app for my own use).

    Now, when I pull it out, its not formatted and displaying it on the screen 
    is just one long line.

    How can I keep newlines/r and formatting from the text that is input into
    the textarea box?

    Thanks.

    - Ben

    _______________________________________________
    New York PHP Community Talk Mailing List 
    http://lists.nyphp.org/mailman/listinfo/talk

    NYPHPCon 2006 Presentations Online
    http://www.nyphpcon.com

    Show Your Participation in New York PHP
    http://www.nyphp.org/show_participation.php





------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20061019/fa4bdbf0/attachment.html>


More information about the talk mailing list