PHP code example of fsi / json-builder

1. Go to this page and download the library: Download fsi/json-builder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fsi / json-builder example snippets

 php
use Ivory\JsonBuilder\JsonBuilder;

$builder = new JsonBuilder();
$json = $builder
    ->setValues(array('foo' => array('bar')))
    ->setValue('[baz]', 'bat', false)
    ->build();

// {"foo":["bar"],"baz":bat}
echo $json;