using flexgrid - importing data from an sql table

using flexgrid - importing data from an sql table

I am using flexgrid, and am trying to apply it to a database of emails to list them out.  To import the data into the tables currently, it uses xml, i believe.  The demo file is named countryArray.inc.php.  The format is as such: 

  1. <?php
  2. $rows = array(
  3. array('iso'=>'AF',
  4. 'name'=>'Afghanistan',
  5. 'iso3'=>'AFG',
  6. 'numcode'=>'4',
  7. ),
  8. array('iso'=>'AL',
  9. 'name'=>'Albania',
  10. 'iso3'=>'ALB',
  11. 'numcode'=>'8',
  12. ),

How do I go from a database, to an array?  Would I have to export first to a text file?  Or is there another way to do this?  Not sure how this exactly works.