function str_to_clantag($int) { $str = pack("N", $int); if ($find = strpos($str, "\0")) $str = substr($str, 0, $find); return $str; }