What is the difference between explode and split?
The explode() and split() both function is use to split a string into an array. But the difference is explode() function splits a string into array by string where as Split function splits string into array by regular expression.
Let's see an example from both
<?php $explode = explode("and", "Roshan and Shyam and Rahul"); print_r($explode); ?> //Output Array (  => Roshan  => Shyam  => Rahul )
<?php $split = split(" :", "Roshan : Shyam : Rahul"); print_r($split); ?> //Output Array (  => Roshan  => Shyam  => Rahul )
Above both function is returning the same array.
Important Interview Question