Manuel: funktion returnt array, wie direkt darauf zugreifen?

Beitrag lesen

foo-code:
function foo($x) {
 return array("lo",$x,"hi");
}

problem:
foo("mid")[0] <- funktioniert nicht ***
(foo("mid"))[0] <- auch nicht ***
print_r(foo("mid")) <- sieht gut aus
$x=foo("mid"); $x[0] <- funktioniert

wie mache ich *** richtig? :)

danke + lg