System:Json:php json encode

From Aspen Documentation

Encodes an array as a JSON-formatted data

Since 1.0

Arguments

string php_json_encode (array $data)

data
The array that needs to be encoded to JSON.

Returns

Returns a string.

Examples

By passing the following array to this function:

$test = array('first'=>'John','last'=>'Doe','age'=>37);
$this->APP->json->php_json_encode($test);

The output will be:

{"first":"John","last":"Doe","age":37}