Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Problem with json and array

$
0
0
Hi, i'm having some problem on creating a JSON starting from an array, when I try to create an array by inserting a key and an element it doesn't work, it actually takes only the element and the key remains empty.

$jsonArray = Array($id_id => $values['username1']);

$newJson = json_encode($jsonArray);

thanks

Viewing all articles
Browse latest Browse all 2586

Trending Articles