I wanted to sort php array based on CRITICAL , WARNING ,INFO sub string and then CRITICAL , WARNING ,INFO sub array should be sorted again with the time stamp value contains in each line of string in acsending order.
Basically at the end I need array to be sorted with CRITICAL 1st with time stamp sorted then WARNING and then INFO so on..
$keys = array_keys($eventinfo["message"]);
for ($i = 0; $i < count($keys); $i++) {
$key = ($keys[$i]);
$perNode = $eventinfo["message"][$key];
$arrTmp = explode("\n", $perNode);
$t = count($arrTmp);
$tmp = 0;
while ($t) {
$t--;
if ($arrTmp[$tmp] != "") {
$cumltvArray[] = "<a href='#'>" . $key. "</a> : </br>".$arrTmp[$tmp];
}
$tmp++;
}
}
$result_str = events_print($cumltvArray);
// $cumltvArray is the one which I am passing to events_print