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
Why is overriding runtime?
How to remove blank spaces from the string?
What are the environmental variables?
Tell me how comparison of objects is done in php5?
What is the difference between laravel and php?
Explain me differences between get and post methods?
What are the advantages of object-oriented programming in php?
How to reset/destroy a cookie?
How to create an array in php?
How does php server work?
What is a string in r?
What is isset function in php?
Explain about the connective abilities of the PHP?
Explain what is the function file_get_contents() usefull for?
What is the use of count() function in php?