// Removing array index reference when using json_encode in php $arr = json_encode(array_values($arr)); // http://stackoverflow.com/questions/20372982/removing-array-index-reference-when-using-json-encode-in-php