${'stats' . $run} = array ( "AP"=>$AP, "EP"=>$EP, "SP"=>$SP, "FX"=>$FX, "Horse"=>$horse, ); $allstats[] = ${'stats' . $run};
I have that running in a while loop to add an array to the main one every time it goes through it. However, my issue is I am trying to assign ranks for each value. Saw horse 1 had AP=51 , EP=47, SP= 32, FX=20. Horse 2 had AP=52, EP = 55, SP=30 and F=19. I am trying to make it print on the screen like so:
AP EP SP FX
Horse 1 2 2 1 1
Horse 2 1 1 2 2
And etc for however many horses there are.
Any ideas or help would be much appreciated. Thanks