Tuesday, July 28, 2009

How do I creat a sortable table in php without mysql?

I want a table that can sort ascending and descending for 4 columns 3 columns will be words and 1 will be images (a rating system, highest stars to lowest stars and visa versa) Can somebody point me to a good example of this?





thanks.

How do I creat a sortable table in php without mysql?
1. you can inject sql through a file or sql command line client.


2. tables formation is dependent in record insertion, so you can only sort views.
Reply:Well you can simulate a database table using an array to represent each of the columns. You'll just need to maintain a relationship between the "rows" across multiple arrays when you go to sort them.





Similarly, you could put the data into a multi-dimensional array, then use a usort (http://us.php.net/manual/en/function.uso... function to perform the sorting.
Reply:You get some expert help from http://gionram.com/


No comments:

Post a Comment