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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.