简体   繁体   中英

Symfony - Compare Word with caracters / 3.4

Hey guys my question is simple how can i check if a word contains a series of characters.

Exemple : Check if IAmATest as Test in it ... ?

Test@gmail.com --> gmail.com = true

Test@Yahoo.eu --> gmail.com = false

if (strpos('Test@gmail.com', 'gmail.com') !== false) {
    // word contains characters
} else {
    // word doesn't contains characters
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM