PHP Programing language

implode() Functions in PHP
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:

Monday Tuesday Wednesday Thursday Friday Saturday Sunday

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: