I need to show a query in a database in a table of two columns in html. I've done it that way, but it does not work out:
<table border=1>
<tr>
<th>Nombre</th>
<th>Poblacion</th>
</tr>
<?php
$sql3='SELECT city.Name,city.Population FROM city as city INNER JOIN country AS country ON city.CountryCode=country.Code
WHERE (country.Region="'.$region.'") AND (country.Name="'.$name.'")';
$resultado3=$db->query($sql3);
echo $region;
echo $name;
echo "<br>";
while($row=$resultado3->fetch(PDO::FETCH_ASSOC)){
print_r ($row);
echo "<br>";
//echo '<tr><td>'.$row[0].'</td><td>'.$row[1].'</td></tr>';
}
?>
</table>
This appears to me, but I do not want it this way:
Array ([Name] = > Oranjestad [Population] = > 29034)