In this tutorial, we will show you how to hide mobile number using PHP. Many PHP project needs this type of specialty. I want to display mobile numbers from the database and we want to show only some digit of a mobile number.
Replace some characters with Asterisks in PHP using. we are using a
substr function to replace characters.
<?php $number = '1234567890'; echo substr($number, 0, 0) . '********' . substr($number, 8); ?>
And if you like this tutorial please share it with your friends on social media.