October 2005
Intermediate to advanced
372 pages
11h 35m
English
implode()
string implode ( stringseparator, arraypieces)
The implode() function converts an array into a string by inserting a separator between each element. This is the reverse of the explode() function. For example:
$oz = "Lions and Tigers and Bears";
$oz_array = explode(" and ", $oz);
// array contains "Lions", "Tigers", "Bears"
$exclams = implode("! ", $oz_array);
// string contains "Lions! Tigers! Bears!"