= 0; $i--) { if($list[$i] == "") unset($list[$i]); } echo json_encode(array_values($list));