array-reverse

php - sort from the end to the beginning

hi, i have a text (text.txt) file like this: shir beer geer deer i have also a php page with that source: <?php foreach (glob("*.txt") as $filename) { $file = $filename; $contents = file($file); $reverse = array_reverse($file, true); $string = implode("<br>" , $contents); echo $string; echo "<br></br>"; } ...