MikeX Posted March 19, 2008 Share Posted March 19, 2008 Hey all I've been trying to format my PHP output on my script. So far I can do three things... Bold Italic Underline using b i u but thats it.. I have no clue how to use color or font or anything. Any ideas? It would be ideal to be able to have no border.. which I know how to do.. and have alternating font/text backing color for each row. Here's my script: <?php include('dbconnect.php'); ?><style type="text/css"> <!-- body { } --> </style> ... <?php // Get all the data from the "Groups" table $result = mysql_query("SELECT * FROM Groups") or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th><b>University</b></th> <th>Group</th> <th>State</th> <th>Zip Code</th> <th>Website</th> <th>Email</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['University_Name']; echo "</td><td>"; echo $row['Group_Name']; echo "</td><td>"; echo $row['State']; echo "</td><td>"; echo $row['Zipcode']; echo "</td><td>"; echo $row['Website']; echo "</td><td>"; echo $row['Email']; echo "</td></tr>"; } echo "</table>"; ?> Link to comment https://forums.phpfreaks.com/topic/96912-formatting-php-output/ Share on other sites More sharing options...
BlueSkyIS Posted March 19, 2008 Share Posted March 19, 2008 this is HTML and CSS, not PHP. i suggest that you google CSS. Link to comment https://forums.phpfreaks.com/topic/96912-formatting-php-output/#findComment-495913 Share on other sites More sharing options...
MikeX Posted March 19, 2008 Author Share Posted March 19, 2008 Well thats perfect.. because I learned how to build websites using pure CSS.. I just don't know how to add the tags to the code without causing errors. Link to comment https://forums.phpfreaks.com/topic/96912-formatting-php-output/#findComment-495930 Share on other sites More sharing options...
kenrbnsn Posted March 19, 2008 Share Posted March 19, 2008 What have you tried? Show us the code that's causing the problems. Ken Link to comment https://forums.phpfreaks.com/topic/96912-formatting-php-output/#findComment-495987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.