A Beginner’s Guide to PHP Explode Function | explode()

PHP explode Function

PHP Explode function mainly used for breaking a string into a PHP array. Exact syntax of PHP explode() function is given,


PHP explode Function

Parameter Email
separator Required. Specifies where to break the string
String Required. The string to split in parts
limit Possible values:
Greater than 0: – Returns an array with a maximum of limit element(s)
Less than 0: – Returns an array except for the last -limit elements()

0: – Returns an array with one element

Changelog The limit parameter was added in PHP 4.0.1, and support for negative limits were added in PHP 5.1.0
 Return Value Returns an array of strings
PHP Version 4+

Table Reference: w3schools.com

Example of PHP explode Function


Note: The “separator” parameter cannot be an empty string.

Note: This function is binary-safe.

Also Check: jQuery autocomplete ajax with Text and Image

Happy Coding..!

Was this article helpful?
My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH. I am a web Programmer by profession and working on more than 50 projects to date. Currently I am working on the web-based project and all the CMS and frameworks which are based on PHP.
Posts created 188

2 thoughts on “A Beginner’s Guide to PHP Explode Function | explode()

Leave a Reply

Your email address will not be published.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top