Hi guys!
I need help in viewing the categories in a proper way. My code is listing the categories in 3 cells but not properly... could someone please fix this table problem so it list the items properly on the 'left', 'center' and right cells?
Thanks!
<?
//connect
include 'config.php';
<table width="100%" border="1" cellspacing="0" >
// prepare the query string
$query = "SELECT id, category, DATE_FORMAT(date, '%d.%m.%Y') ".
"FROM gallery_category ".
"ORDER BY id DESC ";
// execute the query
$result = mysql_query($query) or die('Error, query failed [$query]');
// get cate...
while($row = mysql_fetch_array($result))
{
// from an array values
list($id,$categories,$date) = $row;
$categories = htmlspecialchars($categories);
$date = htmlspecialchars($date);
?>
<tr> <td rowspan="3" width="33%" height="20" align="center" valign="middle" bgcolor="#CCCCCC">
<?
echo $categories;
echo '<br>';
echo $date;
?>
</td> </tr>
<?
}
?>
</table>
</body>
</html>