Splitting a string into an array
by Sanju[ Edit ] 2010-09-17 12:31:37
Splitting a string into an array
The function 'explode' is used to split a string into an array using a separator. It takes the separator and the string as its argument.
Syntax
explode(separator,stringname);
Example
$string="13-09-2010"
explode("-",$string);
Output : 13 in array[0] , 09 in array[1] , 2010 in array[2]