Answers for "php process json data"

PHP
4

php echo json

<?php
$data = ['name' => 'John', 'age' => 35];
header('Content-type: Application/json');
echo json_encode($data);
Posted by: Guest on September-25-2020
0

PHP code to read JSON string on server

$str_json = file_get_contents('php://input');
Posted by: Guest on December-31-2021

Browse Popular Code Answers by Language