![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
31/07/2008, 23:34
|
![Avatar de Ronruby](http://static.forosdelweb.com/customavatars/avatar249338_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 16 años, 6 meses Puntos: 416 | |
Respuesta: strstr inverso? Código PHP: <?php $email = '[email protected]'; $domain = strstr($email, '@'); echo $domain; // prints @example.com
$user = strstr($email, '@', true); // As of PHP 5.3.0 echo $user; // prints name ?> Dale un vistazo a la segunda parte. Solo agrega true y lograras lo que quieres. |