-Karl- Posted June 17, 2010 Share Posted June 17, 2010 Any examples on how to apply it when trying to sort a CSV file. <?php $row = 1; if (($handle = fopen("thefile.csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); $row++; echo '<tr>'; echo '<td>' .$data[0]. '</td>'; echo '<td>' .$data[2]. '</td>'; echo '<td>' .$change. '</td>'; echo '<td>' .$data[3]. '</td>'; echo '<td><img src="./images/' .$which. '.png"></td>'; echo '<td><img src="./images/' .$base. '.png"></td>'; echo '<td><img src="./images/' .$data[4]. '.png"></td>'; echo '</tr>'; } fclose($handle); } ?> I have that so far, however, I have the headings for each of the <td>'s that I want to link, to sort the data, by whatever has been clicked. Link to comment https://forums.phpfreaks.com/topic/204998-array_multisort/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.