Explode() function breaks a string into an array,but implode function returns a string from the elements of an array.
explode example
<?php
$str = "test explode in php";
print_r (explode(" ",$str));
?>
output will be:
Array
(
[0] => test
[1] => explode
[2] => in
[3] => php
)
implode example
<?php $arr = array('hi','hello'); echo implode(" ",$arr); ?> |
hi hello