|
|
Tutorials » Php »
|
Topic |
What is implode Function in string?
|
|
Explanation |
|
The implode function is used to join array elements with a string in PHP.
Syntax:
implode(separator,array)
In the above syntax "seperator" specifies the string to be used to join an array, "array" specifies the array in which to join the strings.
Example:
<?php
$str = array('Hiox','India!','100pulse','Builtmylink!');
echo implode(" ",$str);
?>
Display:
Hiox India! 100pulse Builtmylink!
In the above example the array of strings are seperated by space and displayed
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|