sanderphp Posted May 5, 2008 Share Posted May 5, 2008 Is it easy to return the results in a table style format rather than just spacing with a character in between them like I am currently doing? if(count($results)){ //DISPLAY THE DATA foreach($results as $r){ echo('<li><a href="single.php?id='.$r['id'].'">'.$r['date'].'</a> -- '.$r['total_distance'].' -- '.$r['total_time'].' -- '.$r['ave_speed'].' -- '.$r['rider_id'].'<br><br>'); } }else{ echo('Sorry - no results found'); } Link to comment https://forums.phpfreaks.com/topic/104152-solved-return-query-results-in-a-grid-format/ Share on other sites More sharing options...
Fadion Posted May 5, 2008 Share Posted May 5, 2008 Html is your friend Consider this: <table> <?php $arr = array('php', 'html', 'css'); foreach($arr as $val){ echo '<tr><td>' . $val . '</td></tr>'; } ?> </table> It will show each value in a row. Link to comment https://forums.phpfreaks.com/topic/104152-solved-return-query-results-in-a-grid-format/#findComment-533216 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.