In mysql I have table structure like this:
id | name |
1 | nice |
2 | bad |
I want to show in table like this:
| | nice | bad |
--------------------
|nice| | |
-------------------
|bad | | |
-------------------
I think to using for loop in PHP: I have try with this code :
<tr><td>&bspc</td>
while($r = mysql_fetch_array($res){
echo "<td>".$r['name']."</td></tr>";
if(end($r)){
echo "<tr>".$r['name']."<tr>";
}
}