If I have an object with an array as an attribute, what is the easiest way to access it?
$obj->odp = array("ftw", "pwn", array("cool" => 1337));
//access "ftw"
$obj->odp->0
//access 1337
$obj->odp->2->cool
This doesn't seem to work. Is there something I'm doing wrong, or do I have to first assign it to a variable?
$arr = $obj->odp;
//access "ftw"
$arr[0]
//access 1337
$arr[2]["cool"]