Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
$digit) {
if ($index % 2 === 0) {
$evenSum += $digit;
} else {
$oddSum += $digit;
}
}
$tenthDigit = (7 * $evenSum - $oddSum) % 10;
$eleventhDigit = ($evenSum + $oddSum + $tenthDigit) % 10;
return $tenthDigit . $eleventhDigit;
}
/**
* Checks whether a TCNo has a valid checksum
*
* @param string $tcNo
*
* @return bool
*/
public static function tcNoIsValid($tcNo)
{
return self::tcNoChecksum(substr($tcNo, 0, -2)) === substr($tcNo, -2, 2);
}
}