title: How can I split a string in PHP at the nth occurrence of a needle?
body: <p>There must be a fast and efficient way to split a (text) string at the &quot;nth&quot; occurrence of a needle, but I cannot find it. There is a fairly full set of functions in the <a href="http://www.php.net/manual/en/function.strpos.php#102336" rel="nofollow noreferrer">strpos comments in the PHP manual</a>, but that seems a bit much for what I need.</p>
  <p>I have plain text as <code>$string</code> and want to split it at <em>nth</em> occurrence of <code>$needle</code>, and in my case, <code>needle</code> is simply a space. (I can do the sanity checks!)</p>
  <p>How can I do it?</p>