我试图从多维数组中返回一个值,但它似乎不起作用。
数组-
[players] => Array
(
[0] => Array
(
[player] => Necro
[score] => 0
[deaths] => 0
[gq_name] =>
[gq_kills] =>
[gq_deaths] => 0
[gq_score] => 0
[gq_ping] =>
)
)
PHP Foreach
<?php
$dayzplayers = $results["dayz"]["players"];
foreach($dayzplayers as $k => $v) {
echo ' <b>'.$v["player"].'</b>';
} ?>