Answers for "echo value from json php"

PHP
3

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
2

how to get data from json array in php

$data = json_decode($json);
Posted by: Guest on August-15-2020
0

parse json phph

echo json_decode("[1,2,3]")[0];
Posted by: Guest on January-15-2020

Browse Popular Code Answers by Language