anche questo è relativamente semplice, eccolo già fatto
Codice PHP:
<table border="1" width="100%">
<tr>
<td>Nome</td>
<td>Cognome</td>
<td>Azienda</td>
</tr>
</table>
<?php
$utenti = "SELECT nome,cognome,IDAzienda FROM utenti ORDER BY cognome ASC";
$res = mysql_query($utenti);
while($result = mysql_fetch_array($res))
{
$nome = $result['nome'];
$cognome = $result['cognome'];
$IdA = $result['IDAzienda'];
$azienda = "SELECT nomeAzienda FROM aziende WHERE idAzienda=$IdA";
$result2=mysql_fetch_assoc($azienda);
$nome_az = $result2['nomeAzienda'];
echo"<table border='1' width='100%'>
<tr>
<td>$nome</td>
<td>$cognome</td>
<td>$nome_az</td>
</tr>
</table>";
}
?>
spero di essere stato utile