I have a fix code below
$values=array(
"advertisement1" => 34,
"advertisement2" => 45,
"advertisement3" => 16,
);
I want to take some information from my database and output the same way I have the code above but am getting an error.
I am using
$sql = "SELECT advertisement.adver_name, customer.number_customer FROM advertisement INNER JOIN customer ON advertisement.adver_id = customer.adver_id";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
echo $row['adver_name']. " - ". $row['number_customer'];
echo "<br />";
}
Where it outputs
advertisement1 - 34
advertisement2 - 45
advertisement3 - 16
I tried
$values=array(
while($row = mysql_fetch_array($result)){
echo $row['adver_name']. " => ". $row['number_customer'];
echo "<br />";
}
);
but i get an error