json get-post request in php

118

<?php
  $json = '{
      "title": "PHP",
      "site": "GeeksforGeeks"
  }';
  $data = json_decode($json);
  echo $data->title;
  echo "\n";
  echo $data->site;
?>

Comments

Submit
0 Comments