Posted On: Feb 22, 2018
The explode() and split() functions are used in PHP to split the strings. Both are defined here:
Split() is used to split a string into an array using a regular expression whereas explode() is used to split the string by string using the delimiter.
Example of split():
split(":", "this:is:a:split"); //returns an array that contains this, is, a, split.
Output: Array ([0] => this,[1] => is,[2] => a,[3] => split)
Example of explode():
explode ("take", "take a explode example "); //returns an array which have value "a explode example"
Output: array([0] => "a explode example")
Never Miss an Articles from us.
T_PAAMAYIM_NEKUDOTAYIM is scope resolution operator used as :: (double colon) .Basically, it used to call static methods/variables of a Class...
In PHP == is equal operator and returns TRUE if $a is equal to $b after type juggling and === is Identical operator and return TRUE if $a is equal to $b, and they are of the same data type...