Jfkf14 Posted May 23, 2006 Share Posted May 23, 2006 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?Thank you. Link to comment https://forums.phpfreaks.com/topic/10295-formatting-php-variables-html/ Share on other sites More sharing options...
AndyB Posted May 23, 2006 Share Posted May 23, 2006 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:[code]echo "<bold>". $some_variable. "</bold>";[/code] Link to comment https://forums.phpfreaks.com/topic/10295-formatting-php-variables-html/#findComment-38388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.