My bad.... The array is more complex than I originally posted.
So I need Program and Skill sorted alphabetically Array ( [Program] => Array ( [0] => After School Studies [1] => Gym [2] => Creative Writing ) [Skill] => Array ( [0] => Cohghol [1] => Shit [2] => Thfghfdgh [3] => Zoo [4] => Alfred [5] => Michelle ) ) How can I do this? Program and Skill are merged arrays. I tried sorting them after the merge but same thing... Still produced 1 $sorted = array_merge ($new_data, $selected); //$area is the array value Program or Skill in this case so it inserts the data into Program or Skill $new_selections = Set::insert($all_selections, $area, $sorted); Thanks, Dave -----Original Message----- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: September-30-09 11:47 PM To: CakePHP Subject: Re: Sort returns 1? Because sort() doesn't return a new array, it sorts the current array. $merged = array_merge ($new_skills, $selected); sort($merged); Thats how it works. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---