How To Replace Some Characters With Asterisks in PHP

How To Replace Some Characters With Asterisks in PHP

In this post, i will tell you how to remove some characters with asterisks in PHP.

In some situation you want to hide some characters for security reasons.

For example, if you ever noticed you receive email from bank then you will see some characters of your bank account is removed with asterisks or with any other special characters.

Other example, when you withdraw some amount from atm then you will get a reciept against transaction then you will see they don't show full card number on reciept because of some security reasons and make you safe from scammers.