$rs = odbc_exec($c,$sql); while(!$rs->EOF) { $o=$rs->FetchObject(); echo $o->PAP_EMITIDA; ... ... ..... $rs->MoveNext(); }