|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
format mysql output
Hi.
I am using PHP to get data out of a mysql database. One of the fields holds a text entry like: line one line two Obviously when I display this in html the whitespace and new lines get dropped. is there a way to pull mysql output in html format or something? |
|
#2
|
|||
|
|||
|
RE: format mysql output
Just realised that what I'm after is like how my last entry is being displayed in this forum. So how was it done eh?
Thanks for any help |
|
#3
|
|||
|
|||
|
RE: format mysql output
You can use a function called nl2br() to convert newlines to breaking returns..then use can use str_replace to turn all spaces into non-breaking spaces - ...that should do the trick...
|
|
#4
|
|||
|
|||
|
RE: format mysql output
Thanks Matt you are a legend
|
|
#5
|
|||
|
|||
|
RE: format mysql output
That's what I've been told
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > format mysql output |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|