Answers for "nested json to non nested php"

PHP
0

decode a nested JSON with php

foreach($json as $elem)  {
   echo( $elem['name']." - ".$elem['favourite']['colour'] );
   echo("<br/>");
}
Posted by: Guest on February-12-2021
0

php object into nested json object

{ "client": {
    "build": "1.0",
    "name": "xxxxxx",
    "version": "1.0"
    },
    "protocolVersion": 4,
    "data": {
        "distributorId": "xxxx",
        "distributorPin": "xxxx",
        "locale": "en-US"
    }
}
Posted by: Guest on March-02-2020

Browse Popular Code Answers by Language