Forum Moderators: coopster
$query = 'SELECT * FROM yourtablename';
$query .= ' WHERE id="456"'; /* add a WHERE line if you just need a few rows and not the whole shebang */
$result = mysql_query($query);
if(!$result) echo '<br />query was '.$query.'<br />error is '.mysql_error();
else {
$row = array();
$i = 0;
while($row = mysql_fetch_assoc($result)){
echo '$row['.$i.']:<pre>';
print_r($row[$i]);
echo '</pre>';
}
}
echo 'Now you\'ve got your array $row and you can do all sorts of groovy stuff with it.'