prova così:
Codice PHP:
$prezzo=0.00;     // inizializzo variabile 
                              
if(mysql_num_rows($commento_sql) > 0)  
  {   
      while(
$commento_obj $data->estrai($commento_sql)) 
    
$prezzo abs($commento_obj->prezzodivendita)  ; 

       
$fout fopen("debug.txt""w"); 
              
fwrite($fout,$prezzo ); 
              
fclose($fout);  
   } 
   
 
$data->disconnetti(); 

 
$valoreordine $copie $prezzo
 
$valoreordine=number_format($valoreordine2,",","."); 
     
$fout fopen("calcolatore.txt""w"); 
fwrite($fout,"Numero:$numero\n:Prezzo Unitario :$prezzo\nValore :$valoreordine"); 
fclose($fout);