[thelist] Whitespace, mysql, php, IE<7.0

Mark Groen evolt at markgroen.com
Thu Jan 18 21:03:00 CST 2007

On Thursday 18 January 2007 11:52, Jon Molesa wrote:
> .........
> ...........displays the
> retrieved content unformatted and as one long continuous line.  No
> breaks, no returns, no tabs, nothing.  It took quit a bit of CSS just to
> get it to wrap properly.  I'm almost certain that it has something to
> with the way MySQL/PHP treat data vs. MS Explorer.

I'm not so sure this is a browser issue, but rather of data in/out. Ensure 
your form elements are the correct ones for the job. If it is a string of 
characters like a phone number or name, of course use the type=text input 
element because you want it all on one line anyways.

Otherwise, use a textarea element instead. Upon retrieval, use the built in 
nl2br() function and it will look the same coming out as going in.

echo nl2br($row['a_paragraph']); 




More information about the thelist mailing list