Hi,
I'm trying to format a stocklist of books, there are many and various rules which I can get my head round using if(), but there are two (related) statements which i can't fathom.
If there are 10 different books by 10 different authors, each book (with author) will have a new line. No problem.
The problem is, what if an author has more than 1 book? My remit is to only echo the author name once.
InData (a plugin for InDesign) has the command <<if author like previous author>><<print title>><print price>><<else>><<if author not like previous author<<print title>><<print author>><<print price>>
I was wondering if php had a similar command for what came in the line before it?
Ideally this would be done with a normalised database with a separate author table. Sadly I don't have that luxury - this is coming from a csv file which i'm importing onto my sql server.
Any suggestions please?