<?php
$email = 'name@example.com';
$domain = stristr($email, '@');
echo $domain."<br>"; // prints @example.com
$user = stristr($email, '@', true); // As of PHP 5.3.0
echo $user;
echo "<br>";
echo strpbrk($email,'a');
?>
@example.com
name
ame@example.com
No hay comentarios:
Publicar un comentario