Is there anyway to directly access the data returned in an array without a temporary variable?
Currently, my code is as follows:
function getData($id) {
// mysql query
return mysql_fetch_array($result);
}
$data = getData($id);
echo $data['name'];
Is there a direct way to get the returned data without the temporary variable?