title: Warning: substr() expects parameter 2 to be long
body: <p>Why am I  getting this error while using <code>substr</code>: </p>
  
  <blockquote>
    <p>Warning: substr() expects parameter 2 to be long`</p>
  </blockquote>
  
  <pre><code>$url = "http://coast.x-matic.net/forums/categories/pso-news";
  
  $ch = curl_init(); 
  curl_setopt($ch, CURLOPT_URL, $url); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
  $webdata = (string) curl_exec($ch); 
  curl_close($ch);
  
  echo substr($webdata, "&lt;a * class=\"title\"&gt;*&lt;/a&gt;"); 
  </code></pre>