echo json php
<?php
...
$json_string = json_encode($data, JSON_PRETTY_PRINT);<?php
$data = ['name' => 'John', 'age' => 35];
header('Content-type: Application/json');
echo json_encode($data);
header('Content-type: application/json');
echo json_encode($array);//Json Encode
$person = array(
"name" => "KINGASV",
"title" => "CTO"
);
$personJSON=json_encode($person);//returns JSON string
//Json Decode
$personJSON = '{"name":"KINGASV","title":"CTO"}';
$person = json_decode($personJSON);
echo $person->name; // KINGASV
Also in PHP:
- @lang laravel blade
- chrome see php echo
- date('c') php
- ext-dom install php 7.4
- download laravel
- delete in wordpress query
- create new record via model in laravel
- DATE fromat H:i j M Y
- ErrorException Allowed memory size of 536870912 bytes exhausted (tried to allocate 400560128 bytes)
- date("Y-m-d",
- check all file in server php
- breaking long array in php
- date weschools
- date php :w3schools.com
- database seeding
- @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
- find key in arrray php
- find string into string
- create 64 digit random string php
- add no of days to date php
- create migration laravel
- data.php
- date year php
- clear caches in laravel