Consider the following block of code : implode « Data Structure « PHP

Consider the following block of code

string implode ( string glue, array pieces ) 
array explode ( string separator, string string [, int limit] ) 

//Break the string into an array. 
$expdate = explode ("-","1979-06-23"); 
echo $expdate[0] . ",";

//Then pull it back together into a string. 
$fulldate = implode ("-", $expdate); 
echo $fulldate;  


Related examples in the same category

1.implode an array to form a string.
2.implode( ) function converts an array into a string by inserting a separator between each element
4.Using the implode() Function
5.Making a string from an array with implode()
6.Outputting an Array As a String
7.Printing HTML table rows with implode()
8.Repackage the contents of an array into a delimited string,