Using an array in a dialplan

I am trying to create an application a little like a telephone banking system and want to be able to grab a list of transactions for a user and play them back in a loop

for example

user calls and is identified by their caller ID and asked to enter their PIN
I then use a PHP script to get a list of their transactions, I then want to pass that list back to the dialplan as an array and step through the array one by one by playing first transaction back then tell caller press 1 for next transaction or 2 to return to main menu.

I cannot work out how to use an array in my dialplan

Thanks in advance.

I am not sure you can. But you can interact with the caller via an AGI file, you will find an example of this with the wakeup call module.