$sayi1 = 87654; $sayi2 = 8661; $sonuc = 0; for($i = $sayi2; $i<$sayi1; $i++){ $sonuc++; } echo $sonuc;