Hi everyone.
i have created a latest news page here http://www.mitchellpage.com.au/latest_news.html
i would like to put a php script within my homepage that only shows the first 3 of these news stores. i guess it would need to count the number of BR's on the page or something.
does anyone know a simple script of php that will do this?
thanks guys!
Are these "news stories" being read from a database? If so just use LIMIT on your query.
For example:
$query = "SELECT * FROM news ORDER BY id DESC LIMIT 3";
That would be the easy way. :-)
no they are not from a database. the news articles i manually add to that latest news html file. maybe one day i will have them in the database but for now they are just in html.
so is there some piece of php that can just grab the first 3 articles from the html file testing for the number of <br>'s or something?