erikjan Posted January 29, 2007 Share Posted January 29, 2007 Can someone please help me. Thanks in advance!I have the following piece of code:..........................................................while ($row=mysql_fetch_assoc($result)) { if ($row['object_artist_name'] != $object_artist_name) { // has name changed? $object_artist_name= $row['object_artist_name'];?><br/><table border="0" cellspacing="0" cellpadding="0"><tr><td><span><?php echo $object_artist_name ?></span></a><span class="kopartalphabet">(<?php echo $row['object_artist_year']?>)</span></td></tr></table><?php }//IF NO OBJECT $empty=""; if ($row['object_name'] == $empty) { include("no_work.inc.php");} else {//ELSE echo '<table border="0" cellspacing="0" cellpadding="0"><tr><td><a href=\'details_n.php?object_ID=' , $row['object_ID'] , '\' class=\'link\'><img src="img/pyl_link.jpg" width="17" height="8" border="0">' , $row['object_name'] , ' | ' , $row['object_date'] , '</a>' , ' ' , '</td></tr></table><br/>'; // Display other data } This gives the following ouput in the browser: (each set of data from the database gets a new table [u]below[/u]) Gunilla Best (1898-1945) Object | 1930 Bas Blazoen (1865-1923) Pandemonium edition 52/100 | 1970 Peter Gresten (1865-1923) No artworks available at this moment >> Mark Brusse (1900-1975) Brussel | 1960 Can somebody please help me how to get the following output instead: (two tables [u]next[/u] to eachother) Gunilla Best (1898-1945) Bas Blazoen (1865-1923) Object | 1930 Pandemonium edition 52/100 | 1970 Peter Gresten (1865-1923) Mark Brusse (1900-1975) No artworks available at this moment Brussel | 1960 Thank you very much!! Link to comment https://forums.phpfreaks.com/topic/36196-formatting-tables/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.