Page 1 of 1

String split

Posted: Thu Apr 24, 2008 4:09 pm
by olivarra
hi, i'm new in this language so i want to know if it's any function that splits a string making an array, like that:

$reg_date = '2008-02-24'; (imported from a Mysql database)
$array = Functionthatiwanttoknow($reg_date, "-");
$reg_year = $array[0];
$reg_month = $array[1];
$reg_day = $array[2];

Txs ^^

olivarra

Re: String split

Posted: Thu Apr 24, 2008 4:12 pm
by Oren
explode() is what you need. list() may be of interest as well.

Re: String split

Posted: Thu Apr 24, 2008 4:33 pm
by olivarra
ok thank you very much ^^
olivarra