javascript - Using dynamic value in JSON -
I have a json file (myJson.json) in which I'm adding a dynamic value
< Code> [["Menu": "
Now I use this JSON in my Php file as I am doing:
$ r = "HOME"; $ Str_data = file_get_contents ("MyJson.json"); $ Data = json_decode ($ str_data, true); Var_dump ($ data [0] ['menu']);
Output: " & lt ;? php echo $ r ?? & gt;
" What is a "home" output?
You can type [{{{"{{{" {{{"menu": "R ",}]
and JSON
$ r =" HOME "; Var_dump ($$ data [0] ['menu']);
You will find the home as the output
Comments
Post a Comment