Jump to content

sort array_multisort


MoisesZaragoza

Recommended Posts

Thanks i am trying it out

how do i get my new content out?

i am gettting a error that reads

Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent in /home/content/m/p/m/mpmiami2/html/admin/secure/index_.php on line 79

This is what i have

 
<?php
                            $array_OriginalOrder = array();
                            $i=0;
                            while ($i <= $count_Team-1):
                                // GET TEAM 
                                $TeamID = $array_Team['TeamID'][$i];
                                // Get Total 
                                getAllTOTALByTeam($TeamID);
                                // PopulateAttay
                                $array_OriginalOrder['TeamID'][$i]                  = $TeamID;
                                $array_OriginalOrder['count_getAllTOTALByTeam'][$i] = $count_getAllTOTALByTeam;
                                
                                echo($array_OriginalOrder['TeamID'][$i]);
                                echo(" "); 
                                echo($array_OriginalOrder['count_getAllTOTALByTeam'][$i]);
                                echo("<br /> "); 
                            $i++;
                            endwhile;
                                echo(" <br /> "); 
                            array_multisort($array_OriginalOrder['count_getAllTOTALByTeam'], SORT_ASC, $array_OriginalOrder);
                                echo("<br /> "); 
                            $i=0;
                            while ($i <= $count_Team-1):
                                echo($array_OriginalOrder['TeamID'][$i]);
                                echo(" "); 
                                echo($array_OriginalOrder['count_getAllTOTALByTeam'][$i]);
                                echo("<br /> "); 
                            $i++;
                            endwhile;
                        ?>

Out Put

1 4

2 0

3 1

4 0

5 16

6 5

7 0

8 2

9 0

10 0

11 0

12 0

13 0

14 8

15 0

16 5

 

 

Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent in /home/content/m/p/m/mpmiami2/html/admin/secure/index_.php on line 79

 

1 4

2 0

3 1

4 0

5 16

6 5

7 0

8 2

9 0

10 0

11 0

12 0

13 0

14 8

15 0

16 5

 

Link to comment
https://forums.phpfreaks.com/topic/160524-sort-array_multisort/
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.