strtok() function performs a similar task to explode() : strtok « String « PHP
- PHP
- String
- strtok
strtok() function performs a similar task to explode()
<?php
$anemail = "[email protected]";
$thetoken = strtok ($anemail, "@");
while ($thetoken){
echo $thetoken . "<br />";
$thetoken = strtok ("@");
}
?>
Related examples in the same category