title: How To Replace Some Characters With Asterisks
body: <p>I have a simple task to do with PHP, but since I'm not familiar with Regular Expression or something... I have no clue what I'm going to do.</p>
  
  <p>what I want is very simple actually...</p>
  
  <p>let's say I have these variables :</p>
  
  <pre><code>$Email = 'john@example.com'; // output : ****@example.com
  $Email2 = 'janedoe@example.com'; // output : *******@example.com
  $Email3 = 'johndoe2012@example.com'; // output : ***********@example.com
  
  $Phone = '0821212121'; // output : 082121**** &lt;&lt; REPLACE LAST FOUR DIGIT WITH *
  </code></pre>
  
  <p>how to do this with PHP? thanks.</p>