please help array in columns
Posted: Wed Sep 10, 2003 3:03 pm
I am new to php
Can anybody please help cant get an array to go across columns only to run down one after the other
here is the code
<?
include('config.php');
//Open Connection to database
$db = mysql_connect("$hostname", "$username","$password");
mysql_select_db("$database",$db);
?>
<?
$result = mysql_query("SELECT * FROM models", $db);
while ($product=mysql_fetch_array($result))
{
?>
<table width="90%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><?=$product[name]?></td>
<td><?=$product[age]?></td>
</tr>
</table>
<?
}
?>
here is the result
http://www.dave-ward.co.uk/model/model.php
Can anybody please help cant get an array to go across columns only to run down one after the other
here is the code
<?
include('config.php');
//Open Connection to database
$db = mysql_connect("$hostname", "$username","$password");
mysql_select_db("$database",$db);
?>
<?
$result = mysql_query("SELECT * FROM models", $db);
while ($product=mysql_fetch_array($result))
{
?>
<table width="90%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><?=$product[name]?></td>
<td><?=$product[age]?></td>
</tr>
</table>
<?
}
?>
here is the result
http://www.dave-ward.co.uk/model/model.php