PHP how to limit lines in a string?
<p>i have a variable like the following and i want a function to only keep the first 20 lines, so it will strips any additional \n lines more than 20.</p>

<pre><code>&lt;?php
$mytext="Line1
Line2
Line3
....."

keeptwentyline($mytext);
?&gt;
</code></pre>
