title: PHP Remove everything except numbers from string
body: <p>I am using AJAX to retrieve the ID of a certain HTML element. The HTML ID is constructed like "sqlitem_1", "sqlitem_2", "sqlitem_3" etc. and each number corresponds to a record in the database. </p>
  
  <p>I tried <code>preg_replace('/\D/', '', $item);</code>where <code>$item</code> is the string I need to cut, but this didn't do the trick.</p>