Jump to content

[SOLVED] *'ing Information?


Snooble

Recommended Posts

Try:

 

substr_replace($phone, "*", 0, strlen($phone) - X)

 

Where X is the number of digits you wish to show.

 

Also, if it's seperated by anything this will replace those characters. However, if it's universally seperated you can substr_replace each area. For a number like (123) 456-7890 to show only last 4:

 

substr_replace($phone, "*", 1, 3)

substr_replace($phone, "*", 6, 3)

 

This will show: (***) ***-7890

 

At least it should. <.<

it's simply. 1234567890123456

 

for a credit card.

 

I need to be able to show it as:

 

************3456

I'm storing the card number as: $list['CCNO']

 

and my current code which returns nothing is:

 

substr_replace($list['CCNO'], "*", 0, strlen($list['CCNO']) - ;

 

The page loads and everything but i get a blank space in place of the ccno.

 

Thanks Hugs you genius lol,

 

Snoobs

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.