$count=0;
$numb=50;
foreach ($sepkeys as $dbkey)
{
for ($page=10;$page<=$numb;$page=$page + 10)
{
// the if block
$count=$count+1;
}
}
I am trying to maintain a separate a count for each key number in the above code.
Eg: key- 574, it searches from pages 10-50 and increments the count.
The problem that I have is the count is continuous. After searching for the first key and moves on to the next key and then I need the count to start from the beginning rather than being continuous.
Eg: key-874 : count = 22, in my case the next key 875 : the count is 23
I need to make it 1.
I removed the if block and several lines because the code is too long.
Can someone please suggest me a way how to do it