i want to check the string contains "SDN", whether it is uppercase or lowercase such as "sdn", "Sdn", "sDN and so on, how can I get all that?
I using strpos($company_name, 'SDN') now and only can get the "SDN".
try converting both to the same case:
strpos(strtoupper($company_name), 'SDN');
You could also use preg_match
preg_match('/SDN/i', $company_name);
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.