PHP:如何获得这个字符串值?

时间:2022-10-27 10:59:28

I have an array with the following data:

我有一个包含以下数据的数组:

[steamid] => stdClass Object
(
    [0] => Shakyor
)

How can I get the 'Shakyor' string from there?

我怎样才能从那里得到“Shakyor”字串呢?

  • $array->$steamid doesn't work.
  • 数组- > steamid美元是行不通的。
  • $array->$steamid[0] doesn't work.
  • 数组- > steamid美元[0]是行不通的。
  • $array->$steamid->0 is not legal markup obviously.
  • $array->$steamid->0显然不是合法的标记。

1 个解决方案

#1


5  

$array->$steamid->{0}

#1


5  

$array->$steamid->{0}