Location: PHPKode > scripts > K-Pregs > k-pregs/examples/mastercard.php
<?php

require("../kpregs.php");

/*
Check if a string is a valid MasterCard credit card code
*/

// Checking a single credit card code
$code = "5555555555555555";
if (kpreg_is_valid_mastercard_cc_code($code))
 echo("Valid!");
else
 echo("Invalid!");

?>
Return current item: K-Pregs