I have a flatfile DB I'm using, and I'm not sure how to sort the results so that $g[11] is sorted in descending order.
I don't have access to SQL, so that's not part of the equation. Please post, email, or find me YIM: live_gm_hockey, AIM: LiveGMdotCOM.
<?php
$filename = "whatever.txt";
$search = "whatever";
$fileArray = file($filename);
if ($fileArray === false) { // exactly false
echo "ERROR : unable to open '$filename'.<br />\n";
exit;
}
echo "<table>";
foreach(preg_grep("/$search/i", $fileArray) as $v){
$g = explode("|", $v);
echo "<tr>
<td>$g[0]</td>
<td>$g[1]</td>
<td>$g[2]</td>
<td>$g[3]</td>
<td>$g[4]</td>
<td>$g[5]</td>
<td>$g[6]</td>
<td>$g[7]</td>
<td>$g[8]</td>
<td>$g[9]</td>
<td>$g[10]</td>
<td>$g[11]</td>
<td>$g[12]</td>
<td>$g[13]</td>
<td>$g[14]</td>
<td>$g[15]</td>
<td>$g[16]</td>
</tr>";
}
echo "</table>";
?>