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
you can split the string using explode()
$email = 'hello@email.com'; /*split the string bases on the @ position*/ $parts = explode('@', $email); $namePart = $parts[0];