[eluser]brianw1975[/eluser]
standard array functions won't work since the values of the array indexes are objects. if possible you might modify your array to create something to the effect of
Code:
Array ( [1] => stdClass Object ( [id_distrito] => 01 ) [4] => stdClass Object ( [id_distrito] => 04 ) [11] => stdClass Object ( [id_distrito] => 11 ) [13] => stdClass Object ( [id_distrito] => 13 ) )
thus the index is the id, at least that's probably the easiest way to do it.