I did this in Javascript but when I tried it in PHP its not working.
if (empty($counter)){
   $counter = 1;
}else{
   "plus one to $counter" ($counter++?)
}
I tried this inside the while loop to make it work:
if ($counter == 10){
   echo("Counter is 10!");
}
But it didn't work. Can someone please help me with this?