I want to just get the left half of an email address ( the username part of username@email.com ), so stripping the @ and any characters after it.>
username
username@email.com
If you have PHP5.3 you could use strstr
$email = 'username@email.com'; $username = strstr($email, '@', true); //"username"
If not, just use the trusty substr
substr
$username = substr($email, 0, strpos($email, '@'));