ShadeSlayer Posted May 13, 2009 Share Posted May 13, 2009 I'm trying to make a script that will display my schools block order (this isn't homework, just a side project they asked me to do for their website). So what happens with our block order is this: 2345 6782 3456 7823 4567 8234 5678 and repeats from there (this is a 7 day schedule). So I don't know how I'd start this where it would automatically take the day and assign a correct block order to it. I guess my last resort would be making it manual, but making it automatic would be pretty cool. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 And you need help with? Quote Link to comment Share on other sites More sharing options...
ShadeSlayer Posted May 13, 2009 Author Share Posted May 13, 2009 The entire thing, where do I start? I'm thinking of doing this: $1 = 2345; $2 = 6782; $3 = 3456; $4 = 7823; $5 = 4567; $6 = 8234; $7 = 5678; So now I need to figure the rest of it out to make it so it will go through the block order. Quote Link to comment Share on other sites More sharing options...
DarkSuperHero Posted May 14, 2009 Share Posted May 14, 2009 why not push the elements into an array? <?php $myArray[] = 2345; $myArray[] = 6782; $myArray[] = 3456; $myArray[] = 7823; $myArray[] = 4567; $myArray[] = 8234; $myArray[] = 5678; then you cna use a variety or sort options..... ;-) http://us3.php.net/sort How are you storing the information... its its a database you could store it there... :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.