#php : explode number of strings and sort
public function ExplodeListEventId($arr_eventid){
$arr_full = array();
$arr_exp = explode(",", $arr_eventid);
for ($i=0; $i < count($arr_exp); $i++) {
if($arr_exp[$i] != "" && intval($arr_exp[$i]) > 0){
if(!in_array($arr_exp[$i], $arr_full)){
$arr_full[$i] = intval($arr_exp[$i]);
}
}
}
$arr_sorted = array_values($arr_full);
return $arr_sorted;
}
Comments