- explode: documentation ( source)
<?php
function readLogs($rows = 5) {
$contents = "Hey how are you\nI'm good how are you\nGood nice to meet you\nWhat are you doing?\nNothing much, you?";
$rows = explode('\n', $contents);
$rows_len = count($rows);
echo $rows;
}