Split a String Conversion into php array

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.

Syntax

explode(separator,string,limit)

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

Please follow and like us: