Sample input:
$word = '[email protected]';
Can I make variables to contain everything up to the "@" and everything after?
Desired result:
$one = 'abcdefg';
$two = 'hijk.lmn';
use explode
.
$word = '[email protected]';
$my_array = explode('@', $word);
echo $my_array[0]; // prints "abcdefg"
echo $my_array[1]; // prints "hijk.lmn"