I have exploded values from TXT file.
How to sort LI line according to number within TXT file? See sample 7.
I like to show first 50 records and just records 5 to 10.
Structure of TXT file is like:
15.03.201004:54:347Searchterm1
.
.
.
Code is like:
<?php
$file = file_get_contents('search_terms1.txt');
$lines = explode("\n", $file);
ob_start();
foreach($lines as $line_number => $line) {
if ($line_number >= 50) break;
echo '<li class="tag1"><a href="#">' . array_pop(explode("\t", $line)) . "</a></li>\n";
}
ob_end_flush();
?>