This should be fairly straight forward and not too difficult but im having a bit of trouble.
I have a string of text that is something like this:
"Derek C" <derekc@host.com>
Now what i want to do is just grab "Derek C"
WITHOUT the quotes, so ill have:
Derek C
I have figured out how to just grab:
derekc@host.com
but i cant seem to get it to work for the other way. Code i have looks like this:
$buffer = "\"Derek C\" <derekc@host.com>";
$fromperson = substr($buffer, (strrpos($buffer, "<")+1), -3); }
Now this works perfetc to grab the email, but how am i going to do this to grab the name?