php remove @ from email before function not working -


i trying remove user id of has entered email in form before function as shown in following link.

basically, form has field called "email". entered in variable this:

$email = $_post['email']; 

then have variable contains user id. trying with:

$userid = before ('@', $email); 

but not working.

what want use strstr() function can read here

$email = "name@email.com" $user = strstr($email, '@', true); // of php 5.3.0 echo $user; // prints name 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -