How to display one line from a file rather than the whole lot

From: Date: Fri, 30 Nov 2001 12:51:19 +0000
Subject: How to display one line from a file rather than the whole lot
Groups: php.general 
Request: Send a blank email to php-general+get-76189@lists.php.net to get a copy of this message
Hi guys, I'm looking to edit this to just return one particular line rather than the whole file: <?php // get a web page into an array and print it out $fcontents = file ('http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { echo "<b>Line $line_num:</b> " . htmlspecialchars ($line) . "<br>\n"; } ?> Can anybody help me? Kev _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

« previous php.general (#76189) next »