Jump to content

arrange sections of an array?


aebstract

Recommended Posts

I have an array, and to make it easy let's say they have 2 values: ET and SPEED

Here is an example chart of the array printed out:

 

KEY        ET          SPEED

8          5.2          60

3          5.3          60

1          5.4          70

7          5.4          60

9          5.4          90

6          5.5          60

5          5.6          60

2          5.6          65

4          5.7          60

 

I need to take this array and each group that has a matching ET, put them in order based on SPEED. The corrected chart should be like this:

 

KEY        ET          SPEED

8          5.2          60

3          5.3          60

9          5.4          90

1          5.4          70

7          5.4          60

6          5.5          60

2          5.6          65

5          5.6          60

4          5.7          60

 

Just not sure of how to only arrange the section that need to be. Keys stay the same, just the order changes.

 

Link to comment
https://forums.phpfreaks.com/topic/214112-arrange-sections-of-an-array/
Share on other sites

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.