i have Array ( [0] => dev2 [1] => dev3 [2] => dev4 )
how to convert to ["dev2","dev3","dev4"]
CodePudding user response:
$old_array = array( 'dev2', 'dev3', 'dev4');
$new_array = json_encode($old_array);
echo $new_array;
I hope this is what you want.