Okay, so I'm pretty new to PHP...Call me a newbie, but everything works great if it's completely static, but the problem I have is if I need different results depending on user action. The problem lies with needing to use PHP to take information from files, but otherwise it would work much better alone in Javascript (well, at least from my understanding) since javascript functions can be used after the page loads.
Here's what I want to do:
I have a pile of files, I want PHP to load the data from each file. (they're mostly text documents), but I want to be able to organize the order of the files (and the data in them) on the fly (only for viewing purposes, the name of the files would stay the same).
The only way I could think of how to do this, is to create a cache of all the data I formatted in PHP for each way I want the data to be viewed, but that's obviously extremely inefficient (like I'd be loading the data 5 different ways when they open the page instead of only once and then once again when they reformat to the desired organization).
If they were short documents, that'd be fine - process it each way, create 5 caches, 1 for each format it should be viewed, let PHP process into each way and just pick the cache as I go...or something like that. I don't even know if that would work... :confused:
But what I think I want to do is somehow reload the page to force PHP to format it in a different way each time. I can't think of any other way... :(
I hope some of that makes sense. I'm not looking for someone to just throw me all the code for it, just what possibilities are available to do this? I'm just looking for an idea, and any and all are welcome! Thanks in advance.