Been a while since I did this but as CakePHP uses the id of each
record as the key I think I did
$array[0] => 'value';
ksort($array);
Should work as you can't have a primary key of 0 so it should always
sort to first, actually this would mess with an array sorted by a-z
values.
Ok, how about ...
$this->set('variableName', Set::merge(array(0=>'emptyValue'),
$listArrayFromCake));
Paul.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---