How to take the first value after json decode?

foreach ($region_get_all->{"regions"} as $value) {
          echo $value->{"region-id"}[0];
        }

I use curl to match the data
$region_get_all- > {"regions"} is already json_decode
I want to get the first data of those numbers (region-id)
in this way, he says 55555555.

if you don"t add [0], all id will be displayed

now I am object, not array

.

Please take a look at official document . The second parameter of the json_decode function is set to true and it returns Array.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2bec6-40b15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2bec6-40b15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?