Received an error message
Notice: Undefined offset: 1 ... on line 83
and not sure what it means.
The snippet of code with the function where the message comes from is
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$time = $row['vluchttijd'];
function timeInWords($time) {
list($hours, $minutes) = explode(':', $time);
return (int)$hours . " hrs " . (int)$minutes . " min";**
}
Line 83 is:
list($hours, $minutes) = explode(':', $time);
What am I missing here?
EDITED: Now I get no error, but the query should have 3 results and now I only get 1.
Also I had to add one more line, so now the code looks like:
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$time = $row['vluchttijd'];
if (!function_exists('timeInWords')) {
function timeInWords($time) {
list($hours, $minutes) = explode(':', $time);
return (int)$hours . " hrs " . (int)$minutes . " min";
} $result = mysql_query($sql);
{