title: Notice: Undefined offset: 1 in /somepath/index.php on line 14
body: <p>I got a problem, I get an error with this code:  </p>
  
  <pre><code>$totalpages = substr($totalpages[1],0,1);
  </code></pre>
  
  <p>The weird thing is, the code works?</p>
  
  <p>This is the error i get:  </p>
  
  <pre><code>Notice: Undefined offset: 1 /some/spath.php on line XX&lt;/code&gt;
  </code></pre>