Sunday 31 August 2014

Php String Split to Array

$str = 'one,two,three,four';
$arr=explode(",",$str);
dpr($arr);

--------Result 

Array
(
    [0] => one
    [1] => two
    [2] => three
    [3] => four
)

No comments:

Post a Comment