body); // get rid of linebreaks $decode = json_decode($result); $decode = preg_replace("/^([0-9a-f]{2}([:]|$)){6}$/i",'{$0}',$decode); sort($decode,SORT_STRING | SORT_FLAG_CASE); $array = preg_grep("/^(?!\.)/",$decode); echo "