Skip to content

Instantly share code, notes, and snippets.

@zackperdue
Created October 2, 2012 19:09
Show Gist options
  • Save zackperdue/3822609 to your computer and use it in GitHub Desktop.
Save zackperdue/3822609 to your computer and use it in GitHub Desktop.
$cc_left = substr($cc_number, 0, 4);
$cc_tmp_right = substr($cc_number, 4);
$cc_center = substr($cc_tmp_right, 0, 8);
$cc_right = substr($cc_tmp_right, 8);
echo $cc_number."<br />";
echo $cc_left.$cc_center.$cc_right;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment