-2

I know its silly question but really I don't know whats wrong, I have class that retrieve an array of parameters,like this with print_r function

Array ( [0] => 
      Array ( [points] => 39930 
              [level] => 14 
              [base] => 32000 
              [next] => 40000 
              [progress] => 99 
              [platinum] => 30 
              [gold] => 112 
              [silver] => 290 
              [bronze] => 1050 
              [total] => 1482 ) )

so if I want specific value from this array I can write

$getCount = $psn->get_count($psnUser['jid']);
echo $getCount['gold'];

the output must be 112 but its show me blank page what should I do?

4

1 回答 1

4

You are dealing with a multidimensional array, so you have to point at:

$getCount[0]['gold'];
于 2012-10-08T08:44:58.693 回答