Delete specific word from string by wordlist
<p><br>
I have this function to remove a specific word from a String, this function use a word list.
so i have a query and i want to remove every type of string like (number,number)<br>
this is mycode:<br></p>

<pre><code>$wordlist = array("LIMIT", "0, 5");

 foreach ($wordlist as &amp;$word) {
      $word = '/\b' . preg_quote($word, '/') . '\b/';
  }

 $sql = preg_replace($wordlist, '', $sql);
 var_dump($sql);
</code></pre>

<p>as you can see, if the function get LIMIT or 0,5 it will be removed, how i can remove any type of word like "number, number" so the query will be LIMIT 10, 40 it will be removed too.<br>
to know if a string is with format of "is_number,is_number".
<br>
thanks.</p>
