|
-
theSWEEN
Sorting data from a text file using php
Hello,
I can make a guest book using km and a php file, which writes info to a text file. I use the following to load the data into a dynamic text box(you've probably seen it before)..
Ecran = "loading entries ...";
var gbend = 1;
gbpage = 1;
vr1 = 0;
vr2 = "No";
this.loadVariables("/shoutbox/shoutbox.php?vr1="+vr1+"&vr2="+vr2+"&R="+random(99 9));
stop();
Does anyone know of a way of using the same method of retrieving data but loading it all in a particular order?..
For example, if the movie records the age and name into a text file.. then the movie loads the info in age order, oldest at the top of the list.
Hope that makes sense..
Thanks again in advance..
-
KoolMoves Moderator
Using LoadVars instead you can access the Raw data loaded with onData and using the string function split to get each line into an array, you can then sort the array. This is a trick I learned from Wilburt.
Here's a good thread where it's explained.
http://board.flashkit.com/board/showthread.php?t=753298
-
theSWEEN
Thanks Bret, I think I can get my head around this! Cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|