dt_gry Posted November 16, 2008 Share Posted November 16, 2008 I am trying to store the last 4 digits of the credit card number that my customers use on my website. the field is set to 16 char. how would I store the last four digits into a $String_Var? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/132963-solved-string-help/ Share on other sites More sharing options...
wildteen88 Posted November 16, 2008 Share Posted November 16, 2008 Use substr to get the last 4 digits of the number $ccnumb = '1234567898765432'; echo substr($ccnumb, -4); Quote Link to comment https://forums.phpfreaks.com/topic/132963-solved-string-help/#findComment-691444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.