Hello. I am querying a MySQL database with PHP and I need to display the output in a browser. I would like to format the output in a nice looking table, or at least even columns (each cell has a different length, so there aren't easily discernable columns). Is there a way to make some type of table in PHP, or is there a way to port variables from PHP to html (like a reverse $_POST). Is there any other way to do pretty formatting with output from MySQL?
Formatting / PHP variables -> html
1 reply to this topic
Posted 23 May 2006 - 09:23 PM
You can't make a table with php. What you can do is echo a series of html statements. 'Pretty format' it exactly the same way as you would any other text - use html tags. The dot is the string concatenation operator that lets you add stuff to a string ... simple example:
echo "<bold>". $some_variable. "</bold>";
Legend has it that reading the manual never killed anyone.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users