How can I tell if a string contains a certain portion of information?
For example, im reading from a winamp playlist file and I want the line :
NumberOfEntries=20
to be stripped down to just 20 and saved as a variable.
what about preg_match()? you can specify a third argument that will store the match and matches of sub-patterns in an array.
the pattern should be fairly easy in this case, like /NumberOfEntries=(\d+)/
the array would contain the complete match 'NumberOfEntries=20' as first element and '20' as second.
Thanks a lot thats just what I wanted 🙂