split a String Conversion into php array

The explode() function is used to split a string.

sometimes required to convert strings into PHP array. I’ll tell how to use it with examples PHP explode().

explode() function used when we need to split a string using a specific character or string present in that string.



The “separator” and “string” parameter cannot be an empty string.

The limit parameter is an Optional. Specifies the number of array elements to return.

See below example


Leave a Reply

Your email address will not be published. Required fields are marked *