I'm completely new to PHP and, through looking on various sites and other online resources, I came across the <?php include ()?> comand. It has already made the site I'm working on much easier to update, but I am having trouble doing something specific with it.
What I need it to do is either (A) include all the .txt files from a directory on one page (news) and only the 5 most recent .txt files (or highest file names, for example, the text files might be from n1.txt, n2.txt, n3.txt, n4.txt all the way up to n10.txt, and it would only show n6.txt through n10.txt on this page or something like that) on the home page or (B) include all the information from one .txt file on one page and only the 5 lowest sections (or highest declared section, for example, the IDs might be from 1-10, and it would only show IDs 6-10 or something like that) on the home page.
What this is being used for is news about the site with the most recent on the index and all of it on the news page and I have almost no idea what code I need to put together to make something that would do that.
Also, if this method is too complicated of a system, can you suggest a system that might be easier to do for it? I'm trying to make this thing as easy to update and maintain as possible and I really don't know what to do.