Skip to main content

Posts

PHP explode() function explained in plain English (string splitting in php)

The PHP string , Explode() function is an interesting thing. Now I am going to explain the explode() function. I don't know how much I can, but I'm trying to make it understandable to you.   Meaning of explode():  The main function of explode () is to divide a string into smaller parts and store them in an array. In this case, we should indicate by a separator where the string will break, including a limit(limit is optional). Let's think about chopping a cucumber. Suppose, cucumber is our string, the knife is our separator(delimiter), and the pieces of cucumber are array elements. The function of explode() is like chopping a cucumber.  Function signature:                       explode('delimiter',string,limit);                                               ...