I'm working on a php-built report that's supposed to be printed out. It may be used on IE, it may be used on Firefox, I'm not sure which and have no control over the issue. Differences in the output formatting of the two browsers mean I have to be able to trim the report at different places in order to keep everything looking neat. (Firefox should print landscape with 8 records per page, IE portrait with 10.)
I've found out about the HTTP_USER_AGENT variable. But, with both the strstr command and the stristr command, I can't seem to extract 'Firefox' from the Firefox user agent string, which shows up on echo as "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:188.8.131.52) Gecko/20070508 Firefox/184.108.40.206".
The word Firefox is in there; I can see it. So why can my comparisons not seem to find it? And if the strstr and stristr functions don't see it, are there other php functions that might?