My example wasn't good. I have a array of objects and want change its positions.
$array = (obj2, obj1, obj3) --> $array = (obj1, obj2, obj3). Like TStringList.Exchange in Delphi. Sort() don't work in this case, because I want sort based in a attribute of the object. Evandro "Evandro Sestrem" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > Has a automatic way to change the position from 2 elements of a array > without use a aux variable? > Like that: > A = (1,3,2) --> A = (1, 2, 3) > > Thanks, > > Evandro > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php