I'm using get_browser(null, true) to display users browser, OS etc. for logging purposes.
However, I don't want to log the complete get_browser output everytime.
If the output were:
and I want to boil it down to:
[browser_name_regex] => ^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:.*) gecko/.* firefox/0\.9.*$
[browser_name_pattern] => Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*
[parent] => Firefox 0.9
[platform] => WinXP
[browser] => Firefox
I've tried using explode, but I can't get it to work properly.
This is what I tried:
How would I go about doing that?
$ex=explode(' ', get_browser(null, true));
echo 'OS: '.$ex.;