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
Can we learn php without html?
Explain the three different kinds of Arrays?
What is the difference between null and empty?
What is default session time and path in PHP. How to change it?
What is isset php?
How can I find my php version?
What is the best website to learn php?
What is the default session out time?
Which operator is used to concatenate two strings in PHP?
Can we override static method in php?
How failures in execution are handled with include() and require() functions?
Which is better php or wordpress?
Do you know what are traits?
How to remove leading and trailing spaces from user input values in php?
Php program to generate fibonacci series?