Ok guys have got a mind block, lost it completley and wonder if anyone out there go throw me a line. So here goes.
I have got an array of information like this
PHP Code:
20-10-2009 00:00:00|1
21-10-2009 00:00:00|1
23-10-2009 00:00:00|1
24-10-2009 00:00:00|4
25-10-2009 00:00:00|4
What I am doing is using the explode to seperate the pipe delimited values whilst looping through the array
PHP Code:
$split = explode("|", $dates);
$id= $split[1];
$date = $split[0];
Ok Here is where either I am complltey over complicating things here or have just overlooked it.
What I want to achieve is to have an array for each $id with the $date(s) for that $id in their own arrays which will intail reside in if you like a master array.
Can anyone help. What I want to end up with is something like this:
PHP Code:
array(
[1] =>
array([0] = > "20-10-2009", [1] => "21-10-2009", [2] => "23-10-2009")
[4] =>
array([0] => " 24-10-2009", [1] => "25-10-2009")
)
The master array i want to refrence by the $id and its array values to be the dates.
I hope it make sense.
Bookmarks