The implode()function returns a string from the element of an array
Note
implode(separator,array)
Example
Note
- The implode() function accept its parameter in either order.How ever for consistency with explode().you should use the document order of argument .The separator parameter of imploded is optional.
implode(separator,array)
Example
<?php $str='hello india'; // it is breaks the string into an array $exp_str=explode("",$str); print_r($exp_str); // it returns the string from the elements of an array echo implode("",$exp_str); ?> |
Output:
Array([0]=>hello
[1]=>india)
hello india
0 comments:
Post a Comment