I have a table full of band listings for our Musician Finder program. We want to sort them by genre while still only having one .html or .php file containing all the information.
How would I even start to do this? Preferably with php and avoiding JS because most of our users have noscripts.
Here is a link to the test page HERE. Any suggestions would be great or even just an example of where someone else has done it.
And here is the table on paste bin.
Also, avoiding SQL is a priority to my boss.
EDIT AGAIN: Ok so I was looking more... And why can't I just make all my
So you start by putting all the data into PHP arrays. Then write a function that will sort the array by whichever field you wish. There are many sorting algirithms available for this.
Display the table of data in its default order and add links that will let the user select a different column to sort. In each link you set the name of the column to sort by like this:
<a href="mypage.php?sort=name">Sort By Name</a>
You can then simply use the parameter "sort" to decide how to sort your array before you echo it out into an HTML table.