PHP – file() lines December 15, 2009 • 15 words • 1 min read #PHP $lines = file('all-words.txt'); foreach ($lines as $line_num => $line) { echo "Line number ".$line_num; } Andrew Odendaal Writing about cloud architecture, DevOps, distributed systems, and software development since 2007. About this site → Related Articles Force Download in PHP shortText function toggler in php Send Email PHP Function PHP __autoload function Sending data from javascript to php