sniperscope Posted February 18, 2009 Share Posted February 18, 2009 Hi gurus, can some one tell me(or simply explanation ), how can i display records as below. i could not succeed what ever i done. <table> <tr> <td rowspan="2">RECORD 1</td> <td>RECORD 2</td> <td>RECORD 3</td> </tr> <tr> <td>RECORD 4</td> <td>RECORD 5</td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
trq Posted February 18, 2009 Share Posted February 18, 2009 See the FAQ/Snippet Repository board here. Quote Link to comment Share on other sites More sharing options...
sniperscope Posted February 18, 2009 Author Share Posted February 18, 2009 See the FAQ/Snippet Repository board here. Thanks alot, you are my saver. Quote Link to comment Share on other sites More sharing options...
sniperscope Posted February 18, 2009 Author Share Posted February 18, 2009 Here i solved my problem with my way. Here is the solution. Hope this help to someone who has same problem. Appreciate for any help Regards <table border="1"> <tr> <?php $query = "SELECT * FROM sometable ORDER BY somevalue DESC LIMIT 0, 5"; $r = mysql_query($query, $db_connector) or die(mysql_error()); $row = mysql_fetch_assoc($r); $i = 1; do{ if($i == 4){ echo "<tr>"; } ?> <td <?php if($i == 1){ echo "rowspan=\"2\"";}?>> RECORD 1,2,3</td> <?php if($i == 3){ echo "</tr>"; } ++$i; } while($row = mysql_fetch_array($r)); ?> </tr> </table> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.