RE: [PHP] Replace last 4 of 16 with ****
| From: | WreckRman2 | Date: | Fri, 02 Mar 2001 21:44:38 +0000 |
| Subject: | RE: [PHP] Replace last 4 of 16 with **** | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42401@lists.php.net to get a copy of this message | ||
Excellent, thank you very much...
-----Original Message-----
From: Krznaric Michael [mailto:mkrznaric@rand.com]
Sent: Friday, March 02, 2001 4:32 PM
To: 'WreckRman2'; PHP List Post
Subject: RE: [PHP] Replace last 4 of 16 with ****
Hi,
O.k. this is of the top of my head, but you should get the point.
For more info refer to
http://www.php.net/manual/en/function.substr.php
.
<?
$CC_Number=5602232659988123;
$rest = substr ($CC_Number, 0, 11)."****";
print "Your credit card number is $CC_Number";
?>
What you're doing is extracting the first 12 number and adding "****" to the
end of that string. Hope it helps.
Mike
-----Original Message-----
From: WreckRman2 [mailto:wreckrman2@combatfs.com]
Sent: Friday, March 02, 2001 4:22 PM
To: PHP List Post
Subject: [PHP] Replace last 4 of 16 with ****
I am building an account manager for my web hosting clients in which
they
can edit thier information, etc only I do not want to display the entire
credit card number on the site. Instead I would like to replace the last 4
numbers with a * if possible. Can anyone assist me with the code to do this.
Thanks in advance...
David Smith
Indy Web Design
http://www.indywebdesign.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net