I did look at usort, but am still a little confused...
Here is what the $myobject object looks like:
Array
(
[0] => stdClass Object
For get property stdClass Object use operator ->{'name_property'}, eg $a->{'tid'}
function cmp( $a, $b )
{
if( $a->{'tid'} == $b->{'tid'} ){ return 0 ; }
return ($a->{'tid'} < $b->{'tid'}) ? -1 : 1;
}
usort($myobject,'cmp');
function sort_by_tid( $a, $b )
{
if( $a->{'tid'} == $b->{'tid'} ){ return 0 ; }
return ($a->{'tid'} < $b->{'tid'}) ? -1 : 1;
}
usort($myobject,'sort_by_tid');