Wednesday, 20 March 2013

Filled Under:

difference between split and explode function in php

          In split() function  you can use regular expressions to split a string. and explode() splits a string with a string.
         split() and explode() both are php function used to explode a string. split() almost was used in older php version and now availble version of php is higher than ten and its also support explode().

Ex. explode (" this", "this is a string"); will return “Is a string”
here in the above function first argument is a sign to explode your string.and second if a array.

Ex. Split (" + ", "This+ is a string");


Post a Comment