Elxis CMS Forum
Support => General => Topic started by: xmanhattan on September 22, 2012, 13:41:00
-
Hello all,
I have a small problem with jquery and opera. I would like to know what is the php code to use to detect opera to add a small javascript routine.
-
You can simply use stripos (http://php.net/manual/en/function.stripos.php) function of php and global $_SERVER variable like this:
if (stripos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) {
echo 'You use Opera browser!';
}
-
Ouch, I didn't even think of that. I thought that there might be a special function.
Thanks
-
You are welcome, Peter! ;)