|
|
Splitting a string into an array - PHP
|
Views : 222
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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] |
|
By Sanju, On - 2010-09-17 |
|
|
|