if (strlen($kod) == 5 || strlen($kod) == 6) {
  echo "OK";
}