PHP Strtok() Function Performs Similar Task To Explode() – String Function

<?php
$anemail = "l@b.ca";
$thetoken = strtok ($anemail, "@");
while ($thetoken){
    echo $thetoken . "<br />";
    $thetoken = strtok ("@");
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.