title: PHP: Asterisk only last 4 digits of number
body: <p>Hi i want to change the last 4 digits of number with asterisk
  For example: 123456789101</p>
  <p>I want it to become 12345678**** in database (PHPMyAdmin)</p>
  <p>This is my code</p>
  <pre><code> if(isset($_POST['add'])){
          
      $password = password_hash($_POST['password'], PASSWORD_DEFAULT);
          
      $voter = $_POST['voters_id']; (**I want the voters_id to be asterisk only last 4 digits**)
      }
          
      
   $sql = &quot;INSERT INTO voters (voters_id, password) VALUES ('$voter', '$password')&quot;;
              
      if($conn-&gt;query($sql)){
                  
      echo '&lt;script language=&quot;javascript&quot;&gt;';
                  
      echo 'alert(&quot;Voters sucessfully insert&quot;)';
                  
      echo '&lt;/script&gt;';
                  
      echo (&quot;&lt;script&gt;location.href='index.php'&lt;/script&gt;&quot;);
          
      }
          
      
              
      else{
                 
       $_SESSION['error'] = $conn-&gt;error;
              
      }
          
      }
  </code></pre>
  <p>Is there any idea on how to solve this problem? Thank you in advance!</p>