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
How to set a page as a home page in a php based site?
What is the use of curl()?
What is 'float' property in css?
What is laravel php?
Do you know how can we check the value of a given variable is a number?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What are the functions used in php?
What is the use of rand() in php?
How do you check if a variable has been set in php?
Tell me what is the use of isset() in php?
Will a comparison of an integer 12 and a string "13" work in php?
How long is session timeout?
Why php was called as personal home page?
Is string php function?
What is the use of namespace in php?