I'm trying to make a simple news feed on my site that will show the latest 3 posts from a directory.
I have a directory full of .php files, inside each is some html and a short story with a link to the full page.
On my home page I've got
<?php
$news = scandir('news_posts', SCANDIR_SORT_DESCENDING);
include($news[0]);
include($news[1]);
include($news[2]);
?>
Which isn't working. I've tried print_r, var_export, echo, the best I've managed to do is have it print the names of the variables (so 14.11.14.php, 15.11,14.php, etc.) rather than the html content within the .php files.
This is probably really simple, but being new to .php I'm a little lost and can't seem to find an appropriate answer via search engines.