substr_replace.php
<?php $ccnumber = "1234567899991111"; echo substr_replace($ccnumber,"************",0,12); ?>