title: How to Replace unwanted characters or Special characters in PHP
body: <p>How can I remove unwanted characters on an input text using PHP. I have a working version of javascript which blocks specific characters. However, its still can bypass the script if the user's javascript is disabled. So I'm interested on making a PHP version.</p>
  
  <p>my working javascript for blocking specific characters "&lt;>[]#='";()$&amp;"</p>
  
  <pre><code>&lt;input id="cleanify" placeholder="Some text here"&gt;
  
  &lt;script type="text/javascript"&gt;
  $('#cleanify').bind('keyup blur', function() {
      $(this).val($(this).val().replace(/[&lt;&gt;#=';",$&amp;(\)[\]]/g,'_'))
  });
  
  &lt;/script&gt;
  </code></pre>