Advertisement
Virajsinh

HIde Mobile Number in Php

Feb 24th, 2021
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. // Hide Mobile in Php ( Partially Hide Phone in PHP )
  2.  
  3. <?php
  4.  
  5. function hide_mobile_no($number)
  6. {
  7.     return substr($number, 0, 2) . '******' . substr($number, -2);
  8. }
  9.  
  10. $number = 9898899165 ;
  11.  
  12. echo hide_mobile_no($number) ;
  13.  
  14. ?>
  15.  
  16. /*
  17. Output :
  18. --------------------
  19.  
  20. 98******65
  21. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement