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
What are different types of Print Functions available in PHP?
Tell me what's the difference between include and require?
Which php framework is fastest?
What is the use of pear in php?
Tell me what are sql injections, how do you prevent them and what are the best practices?
Explain soundex() and metaphone().
When should you use a stored procedure?
What is difference between get and post in php?
What is a php namespace?
How to execute a function in php?
What is the difference between overloading and overriding in php?
Is php easier than javascript?
Write a program in php to find the occurrence of a word in a string?
What type of headers have to be added in the mail function to attach a file?
What is the use of preg_match in php?