我目前正在尝试获取以下内容
['orders.customerlock'] from the following information
string(3145) "{"recsonpage":"6","6":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"x","orders.endtime":"x","orders.resellerlock":"false","orders.timestamp":"2012-07-16 18:30:36.76788+00","orders.customerlock":"true","entity.entitytypeid":"3","entity.currentstatus":"Active","entitytype.entitytypekey":"domcno","orders.transferlock":"true","orders.creationtime":"1342463436","entitytype.entitytypename":".COM Domain Name","orders.creationdt":"1342463436","entity.description":"x"},"5":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"44331779","orders.endtime":"1370362990","orders.resellerlock":"false","orders.timestamp":"2012-06-04 16:23:12.282333+00","orders.customerlock":"true","entity.entitytypeid":"3","entity.currentstatus":"Active","entitytype.entitytypekey":"domcno","orders.transferlock":"true","orders.creationtime":"1338826990","entitytype.entitytypename":".COM Domain Name","orders.creationdt":"1338826990","entity.description":"estavisapplication.com"},"4":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"44199575","orders.endtime":"1369853889","orders.resellerlock":"false","orders.timestamp":"2012-05-29 18:58:11.219513+00","orders.customerlock":"true","entity.entitytypeid":"3","entity.currentstatus":"Active","entitytype.entitytypekey":"domcno","orders.transferlock":"true","orders.creationtime":"1338317889","entitytype.entitytypename":".COM Domain Name","orders.creationdt":"1338316103","entity.description":"x"},"3":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"43923731","orders.endtime":"1368676977","orders.resellerlock":"false","orders.timestamp":"2012-06-04 16:47:25.45736+00","orders.customerlock":"true","entity.entitytypeid":"2","entity.currentstatus":"Suspended","entitytype.entitytypekey":"dominfo","orders.transferlock":"true","orders.creationtime":"1337140977","entitytype.entitytypename":".INFO Domain Name","orders.creationdt":"1337140977","entity.description":"x"},"2":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"43885152","orders.endtime":"1400025600","orders.resellerlock":"false","orders.timestamp":"2012-05-14 18:40:40.744535+00","orders.customerlock":"false","entity.entitytypeid":"64","entity.currentstatus":"Active","entitytype.entitytypekey":"thirdleveldotuk","orders.transferlock":"false","orders.creationtime":"1336953600","entitytype.entitytypename":"ThirdLevel DotUK Domain Name","orders.creationdt":"1337019369","entity.description":"x"},"recsindb":"6","1":{"orders.orderid":"x","entity.customerid":"x","entity.entityid":"x","orders.endtime":"1397779200","orders.resellerlock":"false","orders.timestamp":"2012-04-18 01:31:08.774762+00","orders.customerlock":"false","entity.entitytypeid":"64","entity.currentstatus":"Active","entitytype.entitytypekey":"thirdleveldotuk","orders.transferlock":"false","orders.creationtime":"1334707200","entitytype.entitytypename":"ThirdLevel DotUK Domain Name","orders.creationdt":"1334705745","entity.description":"x"}}"
我们遇到的唯一问题是,当我们尝试使用以下内容时:
<? foreach ($json_a as $person_name => $person_a) {
echo $person_a['orders.customerlock'];
echo "<br>";
}
?>
它显示以下内容:
6
true
true
true
true
false
6
false
6 和其他 6 来自页面上的其他字段,有什么办法可以阻止 foreach 拾取这些
对文本的大小表示歉意,我认为最好让您查看完整的文本集,以便您可以查看有哪些参考资料