Count Number of lines using php

December 12th, 2007No Comments

<?php
$file = "somefile.txt";

$lines = count(file($file));

echo "There are $lines lines in $file";

?>

Related Posts:

Tagged :

No Responses

Comments are closed.