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> Link to comment https://forums.phpfreaks.com/topic/145685-solved-records-alignment/ Share on other sites More sharing options...
trq Posted February 18, 2009 Share Posted February 18, 2009 See the FAQ/Snippet Repository board here. Link to comment https://forums.phpfreaks.com/topic/145685-solved-records-alignment/#findComment-764847 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. Link to comment https://forums.phpfreaks.com/topic/145685-solved-records-alignment/#findComment-764854 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> Link to comment https://forums.phpfreaks.com/topic/145685-solved-records-alignment/#findComment-764913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.