Phpfanboi Posted September 4, 2010 Share Posted September 4, 2010 Hello all , I have a small issue in regards to allowing for my results to be placed horizontally across the page instead of vertically. I find the code i have posted works well when it comes to finding and displaying my information as requested (vertically) , but i am having trouble with finding a way to display the results horizontally. I know i need a way to identify each result?in order to echo it out in between <td> </td> , but i am still unsure , a point in the right direction would be good as i am struggling to find a way thankyou. $title = $runrows['title']; $desc = $runrows['description']; $url = $runrows['url']; $img = $runrows['image']; $id = $runrows['id']; echo " <table width='100px'> <h4><a href='http://$url'><b>$title</b></a><br /> $desc<br> <font color='00CC00'>$url</font></h4> <tr><img src='data:image/png;base64,$img' /> $id "; Link to comment https://forums.phpfreaks.com/topic/212513-horizontal-tables-php/ Share on other sites More sharing options...
sasa Posted September 4, 2010 Share Posted September 4, 2010 try <?php $test = range(1, 5); echo '<table border="3"><tr>'; foreach ($test as $data){ echo '<td width="100px">'; echo $data; echo '</td>'; } echo '</tr></table>'; ?> Link to comment https://forums.phpfreaks.com/topic/212513-horizontal-tables-php/#findComment-1107170 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.