ISN (International Social Networking Services - Interactive Apps and Websites)



Adding dashes to credit card numbers - PHP Scripts


 

<? 
function AddDash($CC_Num,$CC_Type){ 
if ($CC_Type="VISA") { 
$NewCC=""; 
for ($i=0 ; $i < 4 ; $i++) 
$NewCC=$NewCC.substr($CC_Num, ($i*4), 4)."-"; 
$NewCC=substr($NewCC,0,19); 
return ($NewCC); 
 
// Example : 
 
$new_cc_num=AddDash("4580458045804580","VISA"); 
echo"$new_cc_num"; 
?>
By continuing to use this site, you agree to the use of cookies to personalize content and advertisements, to provide social media functionality, to analyze our traffic using Google services like Analytics and Adsense.

Google Adsense and its partners may use your data for advertising personalization and cookies may be used for personalized and non-personalized advertising. How does Google use my data?
Please use the following button to see the list of Google partners as well as all the details regarding cookies.
See detailsI Accept
These cookies are mandatory for the operation of isn-services.com, if you do not accept them please quit this site.
You have the right to refuse cookies and leave the site or to change the parameters.