[wd_asp elements=’search’ ratio=’100%’ id=1]

Join combine array into string/text PHP

14th March 2014

Php - Arrays

php codehaven

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.

$cars=array("Volvo","BMW","Toyota");
$result_string = join(',', $cars);
echo $result_string;