bri0987 Posted November 19, 2007 Share Posted November 19, 2007 I need to "x" out part of a credit card... So if the credit card is: 1111555567891234 I need it to echo: xxxx-xxxx-xxxx-1234 Anyone know how to do this. Thanks, BRI Link to comment https://forums.phpfreaks.com/topic/77900-solved-exxxing-out-parts-of-a-string-hmmmm/ Share on other sites More sharing options...
rajivgonsalves Posted November 19, 2007 Share Posted November 19, 2007 something like this should work $intCardNo = "4111111111111111"; $strCardNo = "xxxx-xxxx-xxxx-".substr($intCardNo, -4); print $strCardNo; Link to comment https://forums.phpfreaks.com/topic/77900-solved-exxxing-out-parts-of-a-string-hmmmm/#findComment-394306 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.