I have this function
// var declared
$Queries[course] = "SELECT * FROM course";
function dbSelect($table, $operation) {
$query = mysql_query($table) or die(mysql_error());
if ($operation == 'Array') {
$result = mysql_fetch_array($query);
}
return $result;
}
Now I call it like this
$Courses = dbSelect($Queries[course], 'Array')
How can I loop through the returned array if it returns multiple rows?