$lines = 0;if ($fh = fopen('data.txt','r')) { while (! feof($fh)) { if (fgets($fh)) { $lines++; } }}print $lines;?>