Forum Moderators: coopster
For instance, I have an array like this:
$array[0] = "Orange";
$array[1] = "Orange";
$array[2] = "Orange";
$array[3] = "Ball";
$array[4] = "Ball";
I've been using array_unique to group like fields, but that gives me something like this:
$array[0] = "Orange";
$array[3] = "Ball";
But I need it to read:
$array[0] = "Orange";
$array[1] = "Ball";
Any ideas? I've been reading through lots of PHP documentation on array functions, but I must be missing something. I tried using 'sort', but that doesn't work at all. It just outputs a standard variable as "1";
Thanks for any ideas!