'; echo "

$file: "; $data = file_get_contents($prefix . "/$file"); //read the file $convert = explode("\n", $data); //create array separate by new line for ($i=0;$i'; //write value by index if ($i == 0){ echo "

"; } } echo ''; } } $entryFound = false; if (!empty($_GET['entry'])) { $sources = ['news', 'rssentries']; foreach ($sources as $source) { $filenames = scandir('./'.$source.'/', SCANDIR_SORT_DESCENDING); if (in_array($_GET['entry'], $filenames)) { writeNewsEntry($_GET['entry'], $source); $entryFound = true; break; } } } if (!$entryFound) { echo 'Requested news entry not found!'; echo "

"; } echo 'Go back to News'; echo "

"; ?>