Answers
explode() is a built in function PHP, which will breaks the String with given delimeter(separator)
array explode(separator, OriginalString, NoOfElements)
Example 1: explode(" ","Split String in PHP");
If we not pass NoOfElements, then it will split entire text and returns array
Output
array(4) { [0]=> string(5) "Split" [1]=> string(6) "String" [2]=> string(2) "in" [3]=> string(3) "PHP" }
Example 2: explode(" ","Split String in PHP",2);
Here we passed NoOfElements is 2, so explode split string into 2 parts.
array(2) { [0]=> string(5) "Split" [1]=> string(13) "String in PHP" }