anonīms Posted August 9, 2008 Report Share Posted August 9, 2008 nesaprotu kapēc man izvada rezultātu 0 $procenti = round($row['rezultaats'.$i]/$row['summa']); gan row['rezultaats'], gan summa ir un izvadot vnk ar echo viss ir pareizi... piem(1/2) Link to comment Share on other sites More sharing options...
eregi Posted August 9, 2008 Report Share Posted August 9, 2008 Procentus gadienā neapreiķina - round(100*$val/$count,2); Kur count tur liek kopēju skaitu un, kur val tur 'īpašo' $count = 99; // āboli $val = 21; // 21 no tiem ir sarkani echo round(100*$val/$count,2); // 21.21 Link to comment Share on other sites More sharing options...
Recommended Posts