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 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); Link to comment https://forums.phpfreaks.com/topic/132963-solved-string-help/#findComment-691444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.