How should I run the if statement?

I’d like to use a if. But I can’t think of the terms. If the temp here is satisfied with 14, then it goes straight from 15 to 29, from 30 to 49…99999

$new_content = explode("\r\n",$content);
$temp =count($new_content);
echo"$temp";

for($i=0;$i<$temp;$i++)
{
if() {

}

}