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

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

/*
Check if a string is a valid American Express credit card code
*/

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

?>
Return current item: K-Pregs