Thank you for your quick response! Ive been beating my head against the wall with this for days, lol. Below is the output from the array. Also if it helps the context actually stands for an office. So I am trying to sort by office and then by the persons name to provide a neatly organized directory listing.
Array ( [201] => Array ( [type] => friend [context] => a [username] => 201 [secret] => pass20 [callerid] => John Smith<4072301234> [host] => dynamic [nat] => 1 [qualify] => 5000 [canreinvite] => [dtmfmode] => rfc2833 [mailbox] => 201@abc-vm [disallow] => all [allow] => g729 ) [202] => Array ( [type] => friend [context] => a [username] => 202 [secret] => pass202 [callerid] => Andy Jones<4072301235> [host] => dynamic [nat] => 1 [qualify] => 5000 [canreinvite] => [dtmfmode] => rfc2833 [mailbox] => 202@abc-vm [disallow] => all [allow] => g729 ) [203] => Array ( [type] => friend [context] => b [username] => 203 [secret] => pass202 [callerid] => Mr X<4072301235> [host] => dynamic [nat] => 1 [qualify] => 5000 [canreinvite] => [dtmfmode] => rfc2833 [mailbox] => 202@abc-vm [disallow] => all [allow] => g729 ) )