Is there a function similar to substr() except that instead of taking a specific string length, it takes the number of characters until an instance of a certain other character? Something like $var = substr($fullstring, 2, (however many characters are between the character at offset 2 and the next space character)) is what I'm looking for. (Of course, it might not necessarily be a space character; it could be a newline, tab, letter "A", etc.) The only ways I've found to do that involved several steps and were kind of annoying to write and use.