Implode() was used yesterday to convert an array into a string. It is mainly used here, but the string it converts will have certain rules. If there are delimiters in the middle, I will introduce the implode() function below. usage.
Official method introduction
implode(separator,array)
implode() function returns the content array of a string. implode — Join array elements with a string
The code is as follows | Copy code | ||||
$arr = array('Hello','Baidu!','Beautiful','One day!');echo implode(" ",$arr); ?>
|
Hello Baidu! Beautiful day!
implode() yesterday was to convert the array into a string. It is mainly used here, but it converts The string that comes over will have certain rules. If there is a delimiter in the middle, the following...