A simple Google search will reveal a multitude of solutions for converting a two dimension array into HTML using PHP. Unfortunately none of these has the answers I am lookin
Your loops will be something like this:
foreach($myArray as $k => $v)
In $k you'll kave the key, in $v the value... Then you can print both.