Horje
foreach in json object php Code Example
php loop through json
$arr = json_decode('[{"var1":"9","var2":"16","var3":"16"},{"var1":"8","var2":"15","var3":"15"}]');

foreach($arr as $item) { //foreach element in $arr
    $uses = $item['var1']; //etc
}
foreach in json object php
object(stdClass)#5 (2) {
  ["status"]=>
  string(2) "ok"
  ["data"]=>
  object(stdClass)#19 (4) {
    ["id"]=>
    int(38037809)
    ["type"]=>
    string(4) "spot"
    ["state"]=>
    string(7) "working"
    ["list"]=>
    array(930) {
      [0]=>
      object(stdClass)#23 (4) {
        ["currency"]=>
        string(3) "ioi"
        ["type"]=>
        string(5) "trade"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      [1]=>
      object(stdClass)#30 (4) {
        ["currency"]=>
        string(3) "ioi"
        ["type"]=>
        string(6) "frozen"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      [2]=>
      object(stdClass)#28 (4) {
        ["currency"]=>
        string(3) "lun"
        ["type"]=>
        string(5) "trade"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      [3]=>
      object(stdClass)#33 (4) {
        ["currency"]=>
        string(3) "lun"
        ["type"]=>
        string(6) "frozen"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      [4]=>
      object(stdClass)#35 (4) {
        ["currency"]=>
        string(3) "ksm"
        ["type"]=>
        string(5) "trade"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      [5]=>
      object(stdClass)#15 (4) {
        ["currency"]=>
        string(3) "ksm"
        ["type"]=>
        string(6) "frozen"
        ["balance"]=>
        string(1) "0"
        ["seq-num"]=>
        string(1) "0"
      }
      }




Php

Related
hide my echo from page php Code Example hide my echo from page php Code Example
Array unpacking support for string-keyed arrays - PHP 8.1 Code Example Array unpacking support for string-keyed arrays - PHP 8.1 Code Example
livewire modal to datetime-local Code Example livewire modal to datetime-local Code Example
150 charachter display only php Code Example 150 charachter display only php Code Example
bring up the power shell console php Code Example bring up the power shell console php Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7