Sorry, probably I was not clear enough. I need to move the items inside the tree, and this move to be based on the key order. So I just want from Cake to change the lft , rght columns in of my tree so the items to be ordered based on the key values i provided with this array.
On Oct 15, 8:44 am, Jeremy Burns <[email protected]> wrote: > Sorry - my bad, spell correct changed what I typed. I posted 'sort' instead > of 'ksort'. Here's the proper post… > > If you are sorting by the keys (0, 1, 2, etc) use the ksort function. If you > want to sort the whole array, do ksort($myArray) or to sort just one of its > keys do ksort($myArray['my_key']). It's a standard PHP function that returns > true or false. Google is your mate. > > Jeremy Burns > [email protected] > (Skype) +44 208 123 3822 (jeremy_burns) > (m) +44 7973 481949 > (h) +44 208 530 7573 > > On 15 Oct 2011, at 06:42, Jeremy Burns | Class Outfit wrote: > > > > > > > > > If you are sorting by the keys (0, 1, 2, etc) use the sort function. If you > > want to sort the whole array, do sort($myArray) or to sort just one of its > > keys do ksort($myArray['my_key']). It's a standard PHP function that > > returns true or false. Google is your mate. > > > Jeremy Burns > > Class Outfit > > >http://www.classoutfit.com > > > On 15 Oct 2011, at 00:29, Constantin.FF wrote: > > >> I need to reorder a part of my tree. > >> I have given values for example: > >> Array > >> ( > >> [0] => 4 > >> [1] => 5 > >> [2] => 6 > >> [3] => 9 > >> [4] => 8 > >> ) > >> where for example 0,1,2,3,4 is the new order of the relevant item ids > >> I have read all the documentation according the reorder (which is not > >> much), and also browsed the web but jut nothing even similar to this. > >> Please any suggestions. Thanks > > >> -- > >> Our newest site for the community: CakePHP Video > >> Tutorialshttp://tv.cakephp.org > >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > >> others with their CakePHP related questions. > > >> To unsubscribe from this group, send email to > >> [email protected] For more options, visit this group > >> athttp://groups.google.com/group/cake-php > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
