Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pretty json php

composer require majorgrey/pretty_json
  
  

<?php

use MajorGreyPrettyJson;

$array = array(
     "name" => "majorgrey",
     'email' => "chuksjimg@gmail.com",
     'metadata' => array (
         'color' => 'blue',
         'food' => 'chicken'
     )
);
$json = json_encode($array);

$pretty_json = PrettyJson::print($json);
echo $pretty_json;
 
PREVIOUS NEXT
Tagged: #pretty #json #php
ADD COMMENT
Topic
Name
8+9 =