I am writing a small music playing web app, and had a problem I couldn’t figure out a solution to. Music files often start with a two digit track number, eg:
02 Hiding Place (Mudule Remix).m4a
or 15 An Afternoon on the Moon (Jet Jaguar Remix).m4a
How can a PHP script detect the ## * rule and remove the numbers and space at the start of the string?
I thought of looping through the first 3 characters and checking if they were numbers and spaces, then removing with substr, is that the best way?
Thanks in advance!
see:
ltrim