Php, flash and MySQL

I know how to send data from flash to a php page using sendandload.

Also in theroy i know how receive data from a php page.

But i was wondering whats the best way to format the information that you pull from a MySQL database on the php page for flash to pull and put into an array?

I haven’t started this yet but i’m unsure how to do this. so i though i’d get the theory out of the way first.

I used to use php to make an XML page and use flash to load that.