Hi
I hope someone can help, as I am really starting to think I am going mad! What I want to do seems quite simple - but I just cannt get anything to work. Here goes.
I have a table called tdiary. The table is made up of a date column, id column and copy column. Each item in the row contains a date and the copy, sometimes the date is repeated and other times it is not. Example
1: 2005-01-02: SOME COPY
2: 2005-01-02: SOME COPY
3: 2005-01-03: SOME COPY
Now I want to get the information out of the tablelike this:
Date: 2005-01-02
Some Copy
Some Copy
Date: 2005-01-03
Some Copy
(I will use the date_format functio to reformat the date - just keeping it simple for now)
Now whilst I can the date out to read like this:
Date: 2005-01-02
Some Copy
Date: 2005-01-02
Some Copy
Date: 2005-01-03
some copy
using a for statement
I cannt get the date out as I woud like above. I am sure this mst be able to be done using an array of some kind, but I have tried extract and foreach but cannt seem to get them to work.
Has anyone ever done anything like this before? If so could you provide the code or give me a hinter on how to get my copy out as I want it? I promised my boss I would have this done for yesterday! I really dont want to ruin my weekend stewing over this, so I really hope someone can help.
Many thanks in advance
Sam