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. <.<

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.