$users = file("data.txt"); foreach ($users as $user) { list($name, $email) = explode(" ", $user); $email = trim($email); echo "$name \n"; }?>