title: Problem with ereg deprecated
body: <p>Can some please help me to rewrite these code:</p>
  
  <pre><code>if (eregi($asked,$accepted)) {
   $this-&gt;plot_type = $which_pt;
   return true;
  } else {
   $this-&gt;DrawError('$which_pt not an acceptable plot type');
   return false;
  }
  </code></pre>
  
  <p>Any help will be highly appreciated, I have tried all the fix I got through Google but none has been able to fix it.</p>
  
  <p>Thanks.</p>