title: how to get part after last dash in a string?
body: <p>im new to php and i still dont know all, but here is what i need.</p>
  
  <pre><code>$entry= "Beyonce - Halo.mp3"
  </code></pre>
  
  <p>I seperate artist and title using this</p>
  
  <pre><code>"artist" =&gt; basename(strstr(" ".ucwords($entry), "- ", true )),
  "title" =&gt; basename(substr(strrchr(ucwords($entry), "- "), 1), ".mp3"),
  </code></pre>
  
  <p>Can anyone tell me how to get the next text after " - " not from last, because in some cases we had song like this</p>
  
  <pre><code>$entry= "Beyonce - Halo - AlbumName.mp3"
  </code></pre>
  
  <p>and it get the "AlbumName" as title and its wrong!
  How can i fix it? Thank you.</p>