In PHP, what is the simplest way to return the portion of a string before the first occurrence of a specific character?
For example, if I have a string...
\"
How about this:
$string = "The quick brown fox jumped over the etc etc."; $splitter = " "; $pieces = explode($splitter, $string); echo $pieces[0];