N
N
NeTLeaDeR2018-03-19 17:01:59
PHP
NeTLeaDeR, 2018-03-19 17:01:59

How to get the value of an array element?

I use json_decode($a,true), as a result I get this array:
var_dump -

array(1) { ["players"]=> array(1) { [0]=> array(7) { ["SteamId"]=> string(17) "76561198089877971" ["CommunityBanned"]=> bool(false) ["VACBanned"]=> bool(false) ["NumberOfVACBans"]=> int(0) ["DaysSinceLastBan"]=> int(229) ["NumberOfGameBans"]=> int(1) ["EconomyBan"]=> string(4) "none" } } }

How can I access, for example, the value of VACBanned? $a[players][0][VACBanned] returns no value(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question