This script will create/join an array into one long string, with a comma in-between.
You could then again explode it if wished at the comma.
1 2 3 4 5 |
$cars=array("Volvo","BMW","Toyota"); $result_string = join(',', $cars); echo $result_string; |