I'm trying to have this function return multiple results in array(?).
So basically instead of running lookup("354534", "name");
and lookup("354534", "date");
mutiple times for different results, how can I return both name & date from that function, then echo it out so I only have to use the function once?
function lookup($data, $what)
{
$json = file_get_contents("http://site.com/".$data.".json");
$output = json_decode($json, true);
echo $output['foo'][''.$what.''];
}
Thanks!