Codice PHP:
$str "nome1@nome2";
$ar  explode("@"$str);

echo 
$ar[0] . "
"
;
echo 
$ar[1] . "
"
;

$variabile1 $ar[0];

echo 
$variabile1  "
"