I have a loop I want to break after a certain number. So I want display link every 24 records.
for ($i=0; $i<=$TotalProductsString; $i+24)
{
echo "Page link" . $i . "";
}
If $TotalProductsString=52 then it would display the loop 3 times as 24 can only go into 52 around 3 times.
Your loop should look like this: