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. Link to comment https://forums.phpfreaks.com/topic/158015-help-with-a-bit-of-an-array-script/ Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 And you need help with? Link to comment https://forums.phpfreaks.com/topic/158015-help-with-a-bit-of-an-array-script/#findComment-833546 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. Link to comment https://forums.phpfreaks.com/topic/158015-help-with-a-bit-of-an-array-script/#findComment-833671 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... :-) Link to comment https://forums.phpfreaks.com/topic/158015-help-with-a-bit-of-an-array-script/#findComment-833674 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.