当我打印数组print_r($ post)时,我得到了这个结果;
Array ( [0] => Array ( [0] => stdClass Object ( [subscriber_id] => 80010055 [cto_id] => [name] => n [mobile] => 1234564444 [state] => [city] => fsd [cto_subscriber_id] => 0 [password] => e10adc3949ba59abbe56e057f20f883e [email] => n@n.com [email_verified] => 1 [ip_address] => ::1 [last_login_time] => 2012-10-24 11:37:19 ) ) [1] => Array ( [0] => stdClass Object ( [subscriber_id] => 80010055 [ip_address] => [landline_number] => [sex] => 0 [dob] => 0000-00-00 00:00:00 [marital_status] => hfg [state] => [addres] => fgh [city] => fghfg [pincode] => fghfgh ) ) )
如何获得单个值
答案 0 :(得分:2)
Typecast它到阵列?
$arr = (array)$post[0][0];
然后你将能够通过正常数组
循环它foreach ($arr as $key => $value){....}
答案 1 :(得分:1)
foreach $post as $sub {
foreach $sub as $single {
echo $single;
}
}
答案 2 :(得分:1)