Hi there! I'm facing a dilema here, I'll try to show what is my scenario and then explain
what I'm trying to do:
I'm parsing a news site which has this structure
02/05/03
18:00 Header1 Font1
17:00 Header1 Font2
16:56 Header1 Font3
02/04/03
.
.
.
.
and it goes. As you can see my news are nested inside a unique time and this
is inside a date. Well I thought I could do something like this:
Create an array with this structure:
$news[$date][Struct][$i]
where $date is the date ("02/05/03","02/04/03")
Struct is the name of the field (time, header, font)
$i is an integer value, for the example above I'd have:
$news["02/05/03"]["time"][0] = "18:00";
$news["02/05/03"]["header"][0] = "Header1";
$news["02/05/03"]["time"][1] = "17:00";
$news["02/05/03"]["header"][1] = "Header2";
$news["02/04/03"]["time"][0] = "18:00";
$news["02/04/03"]["header"][0] = "Header1";
My question is: Is this the correct solution for a problem like this?
How can I create this array assuming I do have all dates in a var?
Thanks