 <p>Try <code>(35 &gt;= strlen($line)</code> rather than <code>(35 &lt;= strlen($line)</code> if you want lines 35 chars <em>or less</em>. Personally, I prefer to order comparisons like that the other way around, e.g. <code>strlen($line) &lt;= 35</code>, which I think is more readable and avoids mistakes like the one you just made :)</p>