I have this codes. My question is How i can remove .1 one from rest of numbers in my output.
Its gives : The counter is 1464.1
I want it to give : The counter is 1464
<?php
$i = 1000;
$t = 10;
while ($i < 100000000) {
echo"<p>The counter is $i";
$i = $i + ($i / $t);
}
?>
And output is :
The counter is 1000
The counter is 1100
The counter is 1210
The counter is 1331
The counter is 1464.1
The counter is 1610.51
Use intval:
EDIT:
Display purposes only use the above code.
Data manipulation use: