The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
This is how inside my array looks:
blah[0] = 60#cough
blah[1] = 43#blah
blah[2] = 100#woof
blah[3] = 3#moo
..etc
How could i get it to sort the by the numbers before the #?
> Hi i've been playing around with all the different sort array
> functions but cant get it to work the way i want.
>
> This is how inside my array looks:
>
> blah[0] = 60#cough
> blah[1] = 43#blah
> blah[2] = 100#woof
> blah[3] = 3#moo
>
> ..etc
>
> How could i get it to sort the by the numbers before the #?
not very easily, coz it would think that blah[0] should come after blah[3] coz it would see that 6 > 1.
how about using a different array structure?
try this instead:
blah[60] = cough
blah[43] = blah
blah[100] = woof
blah[3] = moo
PHP will simply fill in the missing $blah entries as NULL