错误解析错误:语法错误,意想不到的T_OBJECT_OPERATOR [英] Error Parse error: syntax error, unexpected T_OBJECT_OPERATOR

查看:342
本文介绍了错误解析错误:语法错误,意想不到的T_OBJECT_OPERATOR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜在所有我需要找到解析错误的解决方案:语法错误,意想不到的T_OBJECT_OPERATOR这里是我的code和我的JSON字符串

 &LT ;?
      包括db.inc.php; //数据库连接
      为了$ =SELECT * FROM wp_postmeta
      $结果= mysql_query($顺序);
      $阵列=阵列();
      而($行= mysql_fetch_array($结果)){
      如果($行[meta_id> = 557&安培;&安培; $行[meta_key] =='gdlr足球玩家的设置'){
            $ temp_ar = json_de code($行[meta_value],真实);
            array_push($数组$ temp_ar);
        }        }
      / * $计数=计数($数组);
      为($ I = 0; $ I< $计数; $ I ++){
        回声$阵列[$ i];
        回声< D​​IV>< / DIV>中;        } * /
        的print_r($阵列 - >玩家信息 - >首先名);
        ?>

和JSON

<$p$p><$c$c>{\"player-info\":{\"first-name\":\"Antonio\",\"last-name\":\"Russo\",\"squad\":\"\",\"position\":\"Portiere\",\"position-ab\":\"\",\"nationality\":\"\",\"date-of-birth\":\"\",\"height\":\"\",\"weight\":\"\",\"games-played\":\"\",\"minutes-played\":\"\",\"starts\":\"\",\"substitution-on\":\"\",\"substitution-off\":\"\",\"facebook\":\"\",\"twitter\":\"\",\"youtube\":\"\",\"instagram\":\"\"},\"player-stats\":{\"passes\":\"\",\"passing-accuracy\":\"\",\"passing-accuracy-opp\":\"\",\"duels-won\":\"\",\"duels-lost\":\"\",\"duels-won-percent\":\"\",\"aerial-duels-won\":\"\",\"aerial-duels-lost\":\"\",\"aerial-duels-won-percent\":\"\",\"recoveries\":\"\",\"tackles-won\":\"\",\"tackles-lost\":\"\",\"tackles-won-percent\":\"\",\"clearances\":\"\",\"blocks\":\"\",\"interceptions\":\"\",\"penalties-conceded\":\"\",\"fouls-won\":\"\",\"fouls-conceded\":\"\",\"yellow-cards\":\"\",\"red-cards\":\"\",\"goals\":\"\",\"penalty-goals\":\"\",\"minutes-per-goal\":\"\",\"total-shots-on-target\":\"\",\"total-shots-off-target\":\"\",\"shooting-accuracy\":\"\",\"successful-crosses\":\"\",\"unsuccessful-crosses\":\"\",\"successful-crosses-percent\":\"\",\"assists\":\"\",\"chances-created\":\"\",\"penalties-won\":\"\",\"offsides\":\"\"},\"biography\":{\"biography\":\"\"},\"gallery\":{\"player-gallery\":\"\"}}

在这里更新结构

 阵列([0] =&GT;数组([玩家资料] =&GT;数组([第一名称] =&GT;安东尼奥·[上次名称] =&GT;鲁索[小队] =&GT; [位置] =&GT;门帘[位置AB] =&GT; [国籍] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT;置换式] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT; YouTube的] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;数组([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗,韩元] =&GT; [决斗丢] =&GT; [决斗,赢得百分之] =&GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得%的] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球丢] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT;拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT;犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT; [点球进球] =&GT; [分钟每目标] =&GT;共射击上目标] =&GT; [总射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[1] =&GT; [2] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;多梅尼科[上次名称] =&GT;加卢乔[阵容] =&GT; [位置] =&GT;门帘[位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[3] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;卡梅隆 -  [上次名称] =&GT; CONTRO [阵容] =&GT; [位置] =&GT; Difensore [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[4] =&GT; [5] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;米开朗基罗[上次名称] =&GT; Ierace [阵容] =&GT; [位置] =&GT; Difensore [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[6] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;拉斐尔[上次名称] =&GT; Maurici [阵容] =&GT; [位置] =&GT; Difensore [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[7] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT; SERAFINO [上次名称] =&GT; Mamone [阵容] =&GT; [位置] =&GT; Difensore [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[8] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;文森佐[上次名称] =&GT; Startari [阵容] =&GT; [位置] =&GT; Difensore [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[9] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;加布里埃莱[上次名称] =&GT; Guerrisi [阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[10] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;乔瓦尼·[上次名称] =&GT;纳瓦[阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[11] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;马里奥[上次名称] =&GT;福蒂[阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[12] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;米歇尔[上次名称] =&GT; ABRAMO [阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[13] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;帕斯夸莱[上次名称] =&GT; Zappia [阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[14] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;华伦天奴[上次名称] =&GT; Tassone [阵容] =&GT; [位置] =&GT; Laterale [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[15] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;安东尼奥·[上次名称] =&GT; Sorrenti负责[阵容] =&GT; [位置] =&GT; Attaccante [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[16] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;克劳迪奥[上次名称] =&GT;蒙特罗索[阵容] =&GT; [位置] =&GT; Attaccante [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT;黄卡] =&GT;红卡] =&GT;目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;总-shots上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[17] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;多梅尼科[上次名称] =&GT;科索莱托[阵容] =&GT; [位置] =&GT; Attaccante [位置AB] =&GT [民族] =&GT;日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT [替代上] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;阵列([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] = &GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球-lost] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT; [犯规-承认] =&GT [黄色卡片] =&GT;红卡片] =&GT;目标] =→50 [罚目标] =&GT [分钟每次目标] =&GT;共射击上目标] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;))[18] =&GT;阵列([玩家资料] =&GT;数组([第一名称] =&GT;佩普[上次名称] =&GT; ZAPPIA [阵容] =&GT; [位置] =&GT; COGLIONE [位置AB] =&GT [目标] =&GT;点球进球] =&GT; [分钟每目标] =&GT;共射击上目标] =&GT; [国籍] =&GT;阿弗里卡诺[日期的出生] =&GT;高度] =&GT; [重量] =&GT;游戏-发挥] =&GT; [分钟-起到] =&GT; [开始] =&GT;置换式] =&GT;置换客] =&GT;的Facebook] =&GT; [微博] =&GT;的YouTube] =&GT;的Instagram] =&GT;)玩家统计资料] =&GT;数组([通] =&GT;传球精度] =&GT;传球精度-OPP] =&GT; [决斗-韩元=&GT; [决斗丢] =&GT; [决斗,赢得百分之] =&GT;空中-决斗-韩元=&GT;空中-决斗丢] =&GT;空中-决斗,赢得百分之] =&GT; [回收率] =&GT;铲球-韩元=&GT;铲球丢] =&GT;铲球,赢得百分之] =&GT; [间隙] =&GT;块] =&GT; [拦截] =&GT;的处罚,承认] =&GT;犯规-韩元=&GT;犯规-承认] =&GT;黄卡] = GT;红卡] =&GT;共射击,脱靶] =&GT; [射击精度] =&GT; [成功交叉盘] =&GT; [不成功交叉盘] =&GT; [成功交叉盘百分之] =&GT; [助攻] =&GT; [没准创建] =&GT; [处罚-韩元=&GT; [越位] =&GT; )[传记] =&GT;阵列([传记] =&GT;)[图库] =&GT;阵列([玩家画廊] =&GT;)))

任何想法谢谢了!

下面的解决方案!

  $阵列[0] ['球员信息] [直呼其名]


解决方案

适当的引号,以阵列的标识符添加在,而循环。更改此:

 如果($行[meta_id&GT; = 557&安培;&安培; $行[meta_key] =='gdlr足球玩家的设置'){
   $ temp_ar = json_de code($行[meta_value],真实);
   array_push($数组$ temp_ar);
}

这样:

 如果($行['meta_id']&GT; = 557&安培;&安培; $行['meta_key'] =='gdlr足球玩家的设置'){
   $ temp_ar = json_de code($行['meta_value'],真实);
   array_push($数组$ temp_ar);
}

此外更改以下语句:

 的print_r($阵列 - &GT;玩家信息 - &gt;首先名);

 的print_r($阵列[玩家信息] [直呼其名']); //因为你有一个数组,而不是一个工作对象

Hi at all i need to find a solution for Parse error: syntax error, unexpected T_OBJECT_OPERATOR here is my code and my json string.

<?
      include"db.inc.php";//database connection
      $order = "SELECT * FROM wp_postmeta";
      $result = mysql_query($order);
      $array = array();
      while ($row=mysql_fetch_array($result)){
      if($row[meta_id]>=557 && $row[meta_key]=='gdlr-soccer-player-settings'){
            $temp_ar = json_decode($row[meta_value],true);
            array_push($array,$temp_ar);
        }

        }
      /*$count = count($array);
      for($i = 0;$i<$count;$i++){
        echo $array[$i];
        echo "<div></div>";

        }*/
        print_r($array->player-info->first-name);
        ?>

and json

{"player-info":{"first-name":"Antonio","last-name":"Russo","squad":"","position":"Portiere","position-ab":"","nationality":"","date-of-birth":"","height":"","weight":"","games-played":"","minutes-played":"","starts":"","substitution-on":"","substitution-off":"","facebook":"","twitter":"","youtube":"","instagram":""},"player-stats":{"passes":"","passing-accuracy":"","passing-accuracy-opp":"","duels-won":"","duels-lost":"","duels-won-percent":"","aerial-duels-won":"","aerial-duels-lost":"","aerial-duels-won-percent":"","recoveries":"","tackles-won":"","tackles-lost":"","tackles-won-percent":"","clearances":"","blocks":"","interceptions":"","penalties-conceded":"","fouls-won":"","fouls-conceded":"","yellow-cards":"","red-cards":"","goals":"","penalty-goals":"","minutes-per-goal":"","total-shots-on-target":"","total-shots-off-target":"","shooting-accuracy":"","successful-crosses":"","unsuccessful-crosses":"","successful-crosses-percent":"","assists":"","chances-created":"","penalties-won":"","offsides":""},"biography":{"biography":""},"gallery":{"player-gallery":""}}

Update here the structure

Array ( [0] => Array ( [player-info] => Array ( [first-name] => Antonio [last-name] => Russo [squad] => [position] => Portiere [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [1] => [2] => Array ( [player-info] => Array ( [first-name] => Domenico [last-name] => Galluccio [squad] => [position] => Portiere [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [3] => Array ( [player-info] => Array ( [first-name] => Carmelo [last-name] => Contro [squad] => [position] => Difensore [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [4] => [5] => Array ( [player-info] => Array ( [first-name] => Michelangelo [last-name] => Ierace [squad] => [position] => Difensore [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [6] => Array ( [player-info] => Array ( [first-name] => Raffaele [last-name] => Maurici [squad] => [position] => Difensore [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [7] => Array ( [player-info] => Array ( [first-name] => Serafino [last-name] => Mamone [squad] => [position] => Difensore [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [8] => Array ( [player-info] => Array ( [first-name] => Vincenzo [last-name] => Startari [squad] => [position] => Difensore [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [9] => Array ( [player-info] => Array ( [first-name] => Gabriele [last-name] => Guerrisi [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [10] => Array ( [player-info] => Array ( [first-name] => Giovanni [last-name] => Nava [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [11] => Array ( [player-info] => Array ( [first-name] => Mario [last-name] => Foti [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [12] => Array ( [player-info] => Array ( [first-name] => Michele [last-name] => Abramo [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [13] => Array ( [player-info] => Array ( [first-name] => Pasquale [last-name] => Zappia [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [14] => Array ( [player-info] => Array ( [first-name] => Valentino [last-name] => Tassone [squad] => [position] => Laterale [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [15] => Array ( [player-info] => Array ( [first-name] => Antonio [last-name] => Sorrenti [squad] => [position] => Attaccante [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [16] => Array ( [player-info] => Array ( [first-name] => Claudio [last-name] => Monterosso [squad] => [position] => Attaccante [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [17] => Array ( [player-info] => Array ( [first-name] => Domenico [last-name] => Cosoleto [squad] => [position] => Attaccante [position-ab] => [nationality] => [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [goals] => 50 [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) [18] => Array ( [player-info] => Array ( [first-name] => Peppe [last-name] => ZAPPIA [squad] => [position] => COGLIONE [position-ab] => [goals] => [penalty-goals] => [minutes-per-goal] => [total-shots-on-target] => [nationality] => AFRICANO [date-of-birth] => [height] => [weight] => [games-played] => [minutes-played] => [starts] => [substitution-on] => [substitution-off] => [facebook] => [twitter] => [youtube] => [instagram] => ) [player-stats] => Array ( [passes] => [passing-accuracy] => [passing-accuracy-opp] => [duels-won] => [duels-lost] => [duels-won-percent] => [aerial-duels-won] => [aerial-duels-lost] => [aerial-duels-won-percent] => [recoveries] => [tackles-won] => [tackles-lost] => [tackles-won-percent] => [clearances] => [blocks] => [interceptions] => [penalties-conceded] => [fouls-won] => [fouls-conceded] => [yellow-cards] => [red-cards] => [total-shots-off-target] => [shooting-accuracy] => [successful-crosses] => [unsuccessful-crosses] => [successful-crosses-percent] => [assists] => [chances-created] => [penalties-won] => [offsides] => ) [biography] => Array ( [biography] => ) [gallery] => Array ( [player-gallery] => ) ) )

any idea thanks at all!

Here the solution!

$array[0]['player-info']['first-name']

解决方案

Add proper quotes to your array identifiers in the while loop. Change this:

if($row[meta_id]>=557 && $row[meta_key]=='gdlr-soccer-player-settings'){
   $temp_ar = json_decode($row[meta_value],true);
   array_push($array,$temp_ar);
}

to this:

if($row['meta_id'] >=557 && $row['meta_key']=='gdlr-soccer-player-settings'){
   $temp_ar = json_decode($row['meta_value'],true);
   array_push($array,$temp_ar);
}

Also change the following statement:

print_r($array->player-info->first-name);

to:

print_r($array['player-info']['first-name']); // since you're working with an array, not an object

这篇关于错误解析错误:语法错误,意想不到的T_OBJECT_OPERATOR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆