PHP: How to get a string from between the first two occurences of character
<p>So let's say that I have the following code:</p>

<pre><code>$var = '-77-randomtext-moretext.extension'
</code></pre>

<p>So that nothing in the variable is fixed, except for the hyphens ( - ), and the extension.</p>

<p>Then let's say that I need to strore the '-77-' part as a string.
'-77-' meaning anything in between the first two hyphens, including the hyphens themselves.</p>

<p>How could I do this?</p>
