Answer Posted / puneet bhatt
explode function:-it breaks a string into array.
<?php
$str="hello world.it's a beautiful day.":
print_r(explode(" ",$str):
?>
ans-ARRAY
[0]=>hello
[1]=>world.
[2]=>it's
[3]=>a
[4]=>beautiful
[5]=>day.
implode:-returns a string from elements of an array.
<?php
$arr=array('hello','world!',beautiful,'day!');
echo implode(" ",$arr);
?>
ans-hello world! beautiful day!
Is This Answer Correct ? | 36 Yes | 5 No |
Post New Answer View All Answers
What are the different components used in php for formatting?
What is an anti csrf token?
Explain me how failures in execution are handled with include() and require() functions?
What is the difference between $var and $$var?
Is empty array php?
What is the use of count() function in php?
What are php expressions?
How can I convert ereg expressions to preg in php?
Explain me is it possible to destroy a cookie?
What is a collection in php?
What is encapsulation in php?
How to enable parsing?
Explain how to execute a php script using command line.
What is the phpstorm?
How do you display the output directly to the browser?