...

View Full Version : php parse date into seperate fields



ynotlim
07-15-2008, 05:28 PM
hello coders,

I need help parsing a string into different sets.

ie



$xyz = "1-5-6-10-11-15"

and I want to put them all in separate variables. so

$x[0]=1;
$x[1]=5;
$x[2]=6;
$x[3]=10;
$x[4]=11;
$x[5]=15;


thanks for the help.

-Tony

Brandoe85
07-15-2008, 05:33 PM
Look into explode():
http://us2.php.net/manual/en/function.explode.php

ynotlim
07-15-2008, 05:37 PM
thanks got it!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum