frogbottom
03-06-2009, 07:57 PM
I have 2 associative arrays, "hostids" and "hardware". Here are code snippets to show the structure:
$hostids[$hostid][date]=$date;
$hardware[$hostid][name]=$name;
I want to sort the hostids array based on the alphabetic name from the hardware array. If necessary I can ensure that the 2 arrays have the same hostid keys but it would be even better if it handled a situation where a hostid was missing from one of the arrays. Is this just too convoluted?
$hostids[$hostid][date]=$date;
$hardware[$hostid][name]=$name;
I want to sort the hostids array based on the alphabetic name from the hardware array. If necessary I can ensure that the 2 arrays have the same hostid keys but it would be even better if it handled a situation where a hostid was missing from one of the arrays. Is this just too convoluted?