I am going through a php script which has something like this
echo "<pre>";
var_export($someObj->details);
echo "</pre>";
开发者_如何转开发and the output is something like : http://pastebin.com/gEAFg6R4
now how do I fetch paricular lines for eg if I just want to fetch the height, if have vehicle or not and is male or female ? what is var_export($someObj->details); doing ?
Please study the PHP manual on arrays http://php.net/manual/en/language.types.array.php - the third example shows how to access nested array contents.
In your case it would be:
print $someObj->details["city"];
print $someObj->details["details"]["have_vehicle"];
Can't tell for the rest, as your output paste is incomplete.
精彩评论