I have a date information stored in a sql database. That looks like this 01/18/2004
I want to use an array to pull that date and seperate those 01 18 2004 into their own variables. Seperated by the / what array function do i use to do this?
Thank you for your tyime and help,.
Anthony
using an array to create vars.
Moderator: General Moderators
-
pinehead18
- Forum Contributor
- Posts: 329
- Joined: Thu Jul 31, 2003 9:20 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$array = explode('/', $date);- evilmonkey
- Forum Regular
- Posts: 823
- Joined: Sun Oct 06, 2002 1:24 pm
- Location: Toronto, Canada
Just of curiousity, what would that function return? Would it be something like
??
Thanks!
Code: Select all
$array[1] = 01;
$array[2] = 18;
$array[3] = 2004;Thanks!
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
- evilmonkey
- Forum Regular
- Posts: 823
- Joined: Sun Oct 06, 2002 1:24 pm
- Location: Toronto, Canada