1 || ((strlen($m1[0])<=2) && (count($m2)==1))) { // format XX:XX:XX:XX:XX:XX => OK return $mac; } if (count($m3)>1 && count($m1)==1 && count($m2)==1) { // format XX-XX-XX-XX-XX-XX => convertir return (str_replace('-', ':', $mac)); } if (count($m1)>1 || ((strlen($m1[0])<=4) && (count($m1)==1))) { // format XXXX.XXXX.XXXX => convertir $result = ''; $curr = 0; for ($i=0; $i convertir $result = $mac[0].$mac[1].':'.$mac[2].$mac[3].':'; $result .= $mac[4].$mac[5].':'.$mac[6].$mac[7].':'; $result .= $mac[8].$mac[9].':'.$mac[10].$mac[11]; return ($result); } return ''; } ?>