Menu
I am not that good with arrays but here is what I have.
[code=php]<?php
include(‘includes/db.php’);
$colors = array(“#FF0000″,”#0000FF”,”#00FF00″,”#BEBEBE”,”#C6E2FF”,”#8A2BE2″,”#FF8C00″,”#FF69B4″,”#FAEBD7″);
$query = “SELECT brand FROM computer GROUP BY brand ORDER BY brand”;
$result = mysql_query($query);
echo “<table>”;
while($row = mysql_fetch_array($result) && list($key,$color) = each($colors)){
echo “<tr bgcolor=’$color’><td>”, $row[‘brand’], “</td></tr>”;
}
echo “</table>”;
echo “<h1>This is a test</h1>”;
echo “<img src=’chart.php’>”;
?>
Why won’t this work?