CascadiaPHP 2024

Voting

The Note You're Voting On

notepad at codewalkers dot com
19 years ago
<?php

function stristr_reverse($haystack, $needle) {
$pos = stripos($haystack, $needle) + strlen($needle);
return
substr($haystack, 0, $pos);
}
$email = 'USER@EXAMPLE.com';
echo
stristr_reverse($email, 'er');
// outputs USER

?>

<< Back to user notes page

To Top