function myfunc ()
{
$a['foo'] = 'bar';
$a['baz'] = 'qux';
return $a;
}
How do you do it so that when you call $a = myfunc();
you can use echo $a->foo;
and it will output bar
?
Additional question: Having that simple function above, is it better to return an array or object?