Friday, October 14, 2011

Re: Tree reorder by value

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 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
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate