$records = array (
                   array ('port' => 'COM1', 'primary' => 1),
                   array ('port' => 'COM2', 'primary' => 0)
                 );

foreach ($records as $record) 
{
  print $record['primary'].' '.$record['port']."\n";
}
