Jump to content

Archived

This topic is now archived and is closed to further replies.

Jfkf14

Formatting / PHP variables -> html

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.