I need to create data as this:
{v: 1.0, f: '<h1>1.0</h1>'}
...
but now I only know how to get first parametr so I get:{v: 1.0},
with this code:
$temp[] = array('v' => (string) $naziv);
what I need to add to my code: $temp[] = array('v' => (string) $naziv); to get like this json: {v: 1.0, f: '<h1>1.0</h1>'}
{"v": "1.0", "f": "<h1>1.0</h1>"}json_encode. It will build it correctly if you give it an object: php.net/manual/en/function.json-encode.php