Jump to content

Help with a bit of an array script (?)


ShadeSlayer

Recommended Posts

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

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... :-)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.