i have Array ( [0] => dev2 [1] => dev3 [2] => dev4 )
how to convert to [“dev2″,”dev3″,”dev4”]
Advertisement
Answer
$old_array = array( 'dev2', 'dev3', 'dev4'); $new_array = json_encode($old_array); echo $new_array;
I hope this is what you want.
i have Array ( [0] => dev2 [1] => dev3 [2] => dev4 )
how to convert to [“dev2″,”dev3″,”dev4”]
$old_array = array( 'dev2', 'dev3', 'dev4'); $new_array = json_encode($old_array); echo $new_array;
I hope this is what you want.