I love the SUBSTRING_INDEX function in MySQL, especially because you can use negative indexes to start searching from the right side of the string.
Is there an equiv
If you need equivalent only for SUBSTRING_INDEX(str, delim, 1), you can use:
list($str,) = explode($delim, $str);