Hi everyone
I have some problem to order an array by a field of this, here i leave the example
foreach($xml as $site){
echo '<div><a href="'.$site->loc.'">'.$site->loc.'</a>' .$site->padre.'</div>';
}
Some times the filed $site->padre
is empty but i'd like to order by $site->padre
alphabetical
i saw example with usort but i don't understand how to work it.
Thanks in advance.
Cheers