In previous articles, we introduced the specific use of the explode () function. When we meetThe PHP function implode () combines the array elements into a single string.
Implode (Separator,array)
Separator is optional. Specifies what is placed between the elements of the array. The default is "" (an empty string).
Array required. An array to combine as a string.
Although the separator parameter is optional. However, for backwards compatibility, it is recommended that you use two parameters.
Example of PHP function implode ()
- Php
- $ arr Array(' Hello ', ' world! ', ' Beautiful ', ' day! ');
- echo Implode ("", $arr);
- ?>
Output:
Hello world! Beautiful day!
The above code example is the implementation function of PHP function implode ().
http://www.bkjia.com/PHPjc/446300.html www.bkjia.com true http://www.bkjia.com/PHPjc/446300.html techarticle In previous articles, we introduced the specific use of the explode () function. When we encounter the PHP function implode () combines the array elements into a string. Implode (Separator,...