here is my code
$query = mysql_query("SELECT * FROM accommodation_vacancies WHERE accommodation_id = '$accom'");
$results = mysql_fetch_array($query);
if($query === FALSE) {
die(mysql_error());
} else {
print_r($results);
foreach ($results as $result) {
echo $result['start_date']; echo "<br/>";
}
}
And here is my output
By using the print_r
commant i can see that The variable $results
works properly,the query works properly also, i guess that i have mistakes on the foreach loop.
Thank you.