在php中打印没有循环的数组

时间:2017-04-11 04:47:52

标签: php arrays

我有一个像这样的数组

 Array ( [0] => stdClass Object ( [regno] => 2017/032173
[receiveddate] => 2017-04-11 [diarydate] => 2017-04-11 [actiondate] =>
 2017-04-11 [idproofdetail] => [channel] => N [remarks] =>
[grvcategory] => [name] => cdssfsdf [address] => dfsfsdfsd
[grvdistrict] => [grvstate] => [grvcountry] => [pincode] => [gtype] =>
00 [fromorg] => [fromorgname] => Office
 [fromorgofficer] => Sh. BM [fromorgdesignation] =>
 Under Cell ) )

我想打印像

echo $result->regno;
echo $result->receiveddate;

等等

1 个答案:

答案 0 :(得分:0)

使用此

$result[0]->regno 
$result[0]->receiveddate
$result[0]->remarks