If limit = positive number then the returned array will content limit number of elements with last element containing rest of the string.
If limit = negative number , all components except the last -limit is returned.
If limit = zero , then it is same as 1
We can specify the delimiter and 2nd parameter is the string we want to break and third parameter is optional by which we can fix the number of elements of the array. Let us try some examples. We have used print_r function to display the elements of the array we get out of our explode function.
$str="Welcome to plus2net php tutorial section";
$ar=explode(" ",$str);
print_r($ar);
We have used one space as delimiter. The output is here
The URL of a page consist of domain name, directory name and file name. These are joined by / to create path to the page we execute. The Path of the url pointing to this page is here.