I have a text file with the format below.
Code: Select all
004
This is the fifth message, blah blah etc..
R
15/07/2003
005
This is the fifth message, blah blah etc..
R
16/07/2003entries array (numerically indexed array)
|
|
|
\___ entry array (associative)
|
|
|
\___ entry array (associative)
|
|
|
\___ entry array (associative)
something like below for each text file entry. but prefferably in a for loop.
$entries[0][entrynum]
$entries[0][entrymsg]
$entries[0][entrycolor]
$entries[0][entrydate]
$entries[1][entrynum]
$entries[1][entrymsg]
$entries[1][entrycolor]
$entries[1][entrydate]
.
.
.
the bit which I can't figure out is how to read a text file's contents into the array I described.
if it doesn't make sense please let me know. any helps, tips/ links, code would be appreciated..thanks