| Previous | Home | Next |
implode()
The implode() function returns a string from the elements of an array.
Syntax:implode(separator,array)
In above syntax,"separator" specifies what to put between the array elements. Default is "" (an empty string) and "array" to join a string.
Example:
<?php
$arr = array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
echo implode(" ",$arr);
?>
Output:
| Previous | Home | Next |