PHP – file() linesDecember 15, 2009February 2, 2020 $lines = file('all-words.txt'); foreach ($lines as $line_num => $line) { echo "Line number ".$line_num; } Share this:TwitterFacebookMoreLinkedInRedditTumblrPinterestWhatsApp Like this:Like Loading... RelatedTags:PHP Subscribe Notify of new follow-up comments new replies to my comments {} [+] Name* Email* Website {} [+] Name* Email* Website 0 Comments Inline Feedbacks View all comments