// ... what will the email address be out the @... ;-)
$PARTS = array();
- while (ereg("@", $test)) {
- $pos = strpos($test, "@");
+ while (ereg('@', $test)) {
+ $pos = strpos($test, '@');
$test2 = substr($test, 0, $pos);
// First check backwards
$idx = 0;
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
- if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != "@")) {
+ if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
// Char found so end here again
break;
}
}
// Now replace the email against anchor with mailto and pray...
- $PARTS[] = $check2.$check;
+ $PARTS[] = $check2 . $check;
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));