Answers for "php read [json json"

7

php return json

header('Content-type: application/json');
echo json_encode($array);
Posted by: Guest on March-20-2020
0

read-json-data-response-using-php

$json_data = '{
      "stat": "ok",
      "profile": {
        "providerName": "testing",
        "identifier": "http://testing.com/58263223",
        "displayName": "testing",
        "preferredUsername": "testing",
        "name": {
          "formatted": "testing"
        },
        "url": "http://testing.com/testing/",
        "photo": "https://securecdn.testing.com/uploads/users/5826/3223/avatar32.jpg?1373393837",
        "providerSpecifier": "testing"
      }
    }';

$json = json_decode($json_data);

echo $json->profile->displayName;
echo $json->profile->preferredUsername;
Posted by: Guest on January-27-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language