473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

formatting text

Tim
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?

Cheers

Tim

Jul 19 '05 #1
2 2363
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 &nbsp;
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #2
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 &nbsp;
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
2
by: Colleyville Alan | last post by:
I am using Access and have embedded the ActiveX control Formula One that came with Office 2000. (ver 3.04). I have created and formatted a spreadsheet and now I want to copy the info with...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
7
by: BBFrost | last post by:
I'm receiving decimal values from database queries and placing them on a report page. The users want to see the following .... Db Value Display Value 123.3400 123.34...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
14
by: Scott M. | last post by:
Ok, this is driving me nuts... I am using VS.NET 2003 and trying to take an item out of a row in a loosely-typed dataset and place it in a label as a currency. As it is now, I am getting my...
3
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
1
by: aman909 | last post by:
Hello, Im trying to use conditional formatting in a text box on a form. What im trying to do is that conditional formatting changes the colour of the text in the text box. I need the...
3
by: =?Utf-8?B?b24tbGluZSBqb3VybmFsIGVkaXRvcg==?= | last post by:
I can't seem to cut-and-paste text, with either .doc or .html formatting, into my .asp web-pages --all the formatting is lost. Is there some code that needs to be added to the page that will...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.