PHP: Allow only certain characters in string, without using regex
<p>I want to allow only certain characters in a string, I know it's easy with <strong>preg_match</strong> but this function I couldn't understand it from years :/</p>

<p>As I said I saw millions of preg_match examples, but I want to build mine, I want to allow only:</p>

<p>1) all upper/lower english letters &amp; numbers</p>

<blockquote>
  <p>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890</p>
</blockquote>

<p>2) all arabic letters &amp; numbers</p>

<blockquote>
  <p>اأإآبتثحخدذرزسشصضطظعغفقكلمنهويىءئ١٢٣٤٥٦٧٨٩٠</p>
</blockquote>

<p>3) the following special characters</p>

<blockquote>
  <p>,.()/-+&amp;،</p>
</blockquote>

<p>Anything else I want to remove it.</p>
