Jump to content

Contained in


ldsmike88

Recommended Posts

I am trying to find out if "Windows NT 5.1" is contained in "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" or similar text. For example:


[code]
$userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';
If($userAgent CONTAINS 'Windows NT 5.1'){
    $os = 'Windows XP';
}
[/code]

How do I do this?

Thanks!

Mike
Link to comment
https://forums.phpfreaks.com/topic/6843-contained-in/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.