On Tue, 13 Jan 2004 01:57:06 GMT, in mailing.database.mysql "Tim"
<ti*******@sterlingmicros.com.au> wrote:
| Hi Guys
|
| I have a mysql database that contains guitar tabs and song lyrics (kind of
| like my own personal taborama.com),anyway i have everything stored in the
| database and use php to display all the records on a web page but my problem
| is i can't keep any of the formatting for the tabs or lyrics, i enter
| everything into the database via mysqlcc. When i enter the tabs in mysqlcc
| it all looks nice and formatted but when i print it in php it all goes on
| one line, is there anyway of preserving the format of the text in the mysql
| database or should this question be aimed at a php newsgroup?
The only way is not to display your data in a web page. Browser ignore
whitespace characters like tabs, more than 1 space character and new
lines.
A method would be to read in your record and use regex instructions to
convert tabs to several &nsbp; characters, change newlines to <BR> (or
</P><P>" instructions and spaces to a single
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------