Answer Posted / jhon
Implode and Explode are function sthat are opposite in working
Explode converts a string into array where as implode
coverts an array in string
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);
?>
output will be:
hi hello
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Explain what are psrs? Choose 1 and briefly describe it?
How to create a text file in PHP?
Does php support multiple inheritance?
Tell me how can you pass a variable by reference?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
What are arguments in php?
How to get the number of characters in a string?
Tell me what is the use of "ksort" in php?
What is sorting php?
What is the ioncube php loader?
What is boolean in php?
How can we execute a php script using command line?
How to get no of arguments passed to a PHP Function?
How do I clear my browser session?
What are the characteristics of php variables?