This topic is locked

How to strip @domain.com from email

7/2/2011 2:42:27 PM
PHPRunner General questions
M
MightyRunner author

What can I put in events to to strip "@domain.com" from "parent@domain.com" email ?

and add the left over "parent" combined with "child_id" into "studentID" field ?

So the studentID can look like "parent123"

Thanks A Lot

C
cgphp 7/2/2011

Suppose that $email_var is parent@domain.com and $child_id is 123:

$email_arr = array();

$email_arr = explode('@', $email_var);

$studentID = $email_arr[0] . $child_id;