count the looping
<p>Need help please.</p>

<p>What I need is when looping it will count how many loops after reaches zero.</p>

<pre><code>$variable=50;//this is not fixed
$loop=0;
//------------------//
$variable-10;
//the $variable becomes 40
//$loop becomes 1
//repeat the process
$variable-10;
//the $variable becomes 30
//$loop becomes 2
//until the variable reaches zero then
//$loop becomes 5
</code></pre>
