ecco tutto il codice:

Codice PHP:
function totale_utenti($tb_utenti,$condizione$db)
{   
    
$count mysql_query("SELECT COUNT(*) FROM {$tb_utenti} {$condizione}"$db);
    
$res_count mysql_fetch_row($count);
    
// numero totale di records
    
$tot_utenti=$res_count[0];
    return 
$tot_utenti;
}

//richiamiamo la funzione:

echo totale_utenti("tabella",'WHERE campo=qualcosa',"database");