note 59284 deleted from function.str-pad by bjori

From: Date: Tue, 30 May 2006 18:53:19 +0000
Subject: note 59284 deleted from function.str-pad by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-112559@lists.php.net to get a copy of this message
Note Submitter: mike97gt at yahoo dot com ---- Use str_pad to mask a credit card number. <? $ccnum = $_POST['CC_Number']; $ccmask = str_pad(substr($ccnum, -4), strlen($ccnum), 'x', STR_PAD_LEFT); ?> Works great for storing last 4 digits of credit card number in a database.

« previous php.notes (#112559) next »