title: undefined offset when using php explode()
body: <p>I've written what I thought was a very simple use of the php <code>explode()</code> function to split a name into forename and surname:</p>
  
  <pre><code>// split name into first and last
  $split = explode(' ', $fullname, 2);
  $first = $split[0];
  $last = $split[1];
  </code></pre>
  
  <p>However, this is throwing up a php error with the message <code>"Undefined offset: 1"</code>. The function still seems to work, but I'd like to clear up whatever is causing the error. I've checked the <a href="http://uk.php.net/manual/en/function.explode.php" rel="noreferrer">php manual</a> but their examples use the same syntax as above.
  I think I understand what an undefined offset is, but I can't see why my code is generating the error!</p>