Can someone please point out what I'm sure is a stupidly obvious error in my code? The string "string" in my while loop is displaying the correct amount of times but not the results in row[0].
if (!isset($_GET['city']) & !isset($_GET['county'])) {
$getResults = "SELECT DISTINCT region FROM `locations` WHERE country = 'England'";
echo "No region or county set";
if ($result = $mysqli->query($getResults)) {
echo "Found results";
while ($row = $result->fetch_assoc()) {
echo "string";
echo $row[0];
}
}
}
assocbut trying to display as though the array isenumerated