Method: a::json
Converts an array to a JSON string
It's basically a shortcut for json_encode()
Info
Syntax
a::json($array)
Parameters
- $array (array) The source array
Return (string)
The JSON string
Example
$array = array(
'cat' => 'miao',
'dog' => 'wuff',
'bird' => 'tweet'
);
echo a::json($array);
// output: {"cat":"miao","dog":"wuff","bird":"tweet"}