David Champion on Fri, 12 Dec 2003 16:57:03 -0600


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ciapug] Formatting with line breaks...


You're thinking of a different issue, Jerry. That's addressed with the nl2br() function.

He needs to actually insert :
$x = "text " . chr(13) . chr(10);

I don't recall that there's a constant for CRLF, like VB's vbCRLF... but you could put on in your code, i.e.

$_CRLF = chr(13) . chr(10);

-dc

Jerry Weida wrote:

Are you checking the source? Text-style line breaks won't display in a browser, but they will show up in the source.

Chris Hettinger wrote:

I am trying to insert into a db field a note entry which will contain the details of a web form, but I have to build that long note entry first, and do some light formatting like line breaks...

       $note = "Generate from Web Form Submission \r\n"
             . "testing note formatting. \r\n";

How ever this isn't working as I would have suspected. For testing it as I build it I am just echoing it out to the browser with <?= $note; ?> ... It displays but is not including the line breaks.



_______________________________________________
ciapug mailing list
ciapug@xxxxxxxxxx
http://cialug.org/mailman/listinfo/ciapug