I have be struggling to turn the below while loop into a foreach loop with no result, so I am asking for help here on how to do this.
$query = "Select * from TIME_TABLE Where
Extract(month from DATE_FIELD ) = DATE_FORMAT(NOW(), '%c')
and
Extract(day from DATE_FIELD ) = DATE_FORMAT(NOW(), '%e')
order by DATE_FIELD, DESCRIPTION";
$result = $mysqli->query($query);
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
$dbItems .= "<item> <record_num>" . $row['RECORD_NUM'] . "</record_num>" .
"<date_field>" . $row['DATE_FIELD'] . "</date_field>" .
"<description>" . $row['DESCRIPTION'] . "</description> </item>";
}