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 is a lambda function in php?
What are computer variables?
Which is not a file-related function in php?
Do you know what is the use of the function 'imagetypes()'?
What is the use of the function 'imagetypes()'?
What is x+ mode in fopen() used for?
Why php 7 is faster?
What is the default session time in php?
Tell me how would you declare a function that receives one parameter name hello?
What is __ construct in php?
How to call javascript function in php without any event?
What is return in php function?
What is the $_ server php_self variable?
what is PDO?
What is session and why do we use it?