Hello,
I was interested by this example, but 'sort' doesn't seem to work on the "Samples and demos" part.

I had to put $dir = ($_REQUEST["dir"] == "DESC")? "DESC" : ""; instead of $dir = ($_REQUEST["dir"] == "desc")? "DESC" : "";

I don't think it's really a bug, but maybe someone could modify this example or tell me if I've got this error only on my side.