Код: Выделить всё
if ($devices_xml = curl_get_file_contents($devices_url))
{
$devices = simplexml_load_string($devices_xml);
$data = array(array());
$counter = 0;
foreach ($devices->item as $device)
{
$data[$counter]["id"] = $device->objid;
$data[$counter]["probe"] = $device->probe;
$data[$counter]["name"] = $device->device;
$counter++;
}
array_sort_by_column($data, "probe");
return $data;
}
return false;
}
Код: Выделить всё
function array_sort_by_column(&$arr, $col, $dir = SORT_ASC)
{
$sort_col = array();
foreach ($arr as $key=> $row)
{
$sort_col[$key] = $row[$col];
}
array_multisort($sort_col, $dir, $arr);
}

Подробнее здесь: https://stackoverflow.com/questions/200 ... c-property
Мобильная версия