PHP how to limit lines in a string ?
- by Axel
Hi,
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.
<?php
$mytext="Line1
Line2
Line3
....."
keeptwentyline($mytext);
?>