top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is php explode and implode string function?

+1 vote
442 views
What is php explode and implode string function?
posted Jun 10, 2014 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The implode() function returns a string from elements of an array. It takes an array of strings and joins them together into one string using a delimiter (string to be used between the pieces) of your choice.

The implode function in PHP is easily remembered as "array to string", which simply means that it takes an array and returns a string. It rejoins any array elements and returns the resulting string, which may be put in a variable

The explode function is used to "Split a string by a specified string into pieces i.e. it breaks a string into an array".

The explode function in PHP allows us to break a string into smaller text with each break occurring at the same symbol. This symbol is known as the delimiter. Using the explode command we will create an array from a string. The explode() function breaks a string into an array, but the implode function returns a string from the elements of an array..

answer Jun 14, 2014 by Rajneesh
...