Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are Implode and Explode functions?

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


Please Help Members By Posting Answers For Below Questions

What type of headers have to be added in the mail function to attach a file?

898


Can you define an argument as a reference type?

901


How to count a number of words in a string in php?

927


What is the use of return in php?

868


Tell me how do you define a constant?

902


In php how can you jump in to and out of "php mode"?

928


What is multidimensional array in php?

972


How to set cookies?

956


How does firefox manage cookies?

947


Can php replace javascript?

947


What is difference between base_url and site_url?

963


How many types of array are there in php?

1027


Declare a new variable in php equal to the number 3;

892


How To Get the Uploaded File Information in the Receiving Script?

974


What are magic constants in php?

1027