pastioke.com
PHP

Populate / Iterate Array

Ditulis oleh Tim Pasti Oke

PHP Indexed Array

foreach ($ as $key => $value){

}

or if you want to access object property with variable

Since the name of your property is the string '$t', you can access it like this:

echo $object->{'$t'}

Alternatively, you can put the name of the property in a variable and use it like this:

$property_name = '$t'
echo $object->$property_name

You can see both of these in action on repl.it: https://repl.it/@jrunning/SpiritedTroubledWorkspace

Butuh solusi instan siap pakai?

Dapatkan modul & script server production-ready langsung di web store kami.

Kunjungi Toko Digital

Komentar

Belum ada komentar. Jadilah yang pertama memberikan komentar!

Kirim Komentar