note 128109 added to tutorial.useful
| From: | muneebshoukat60 at gmail dot com | Date: | Fri, 13 Jan 2023 08:09:57 +0000 |
| Subject: | note 128109 added to tutorial.useful | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220063@lists.php.net to get a copy of this message | ||
Remember that:-
strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') will return false, if string
'MSIE' not found. So, the code can be easily simplified as:-
<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
echo 'You are using Internet Explorer.<br />';
}
?>
So, if string 'MSIE' not found, then it will not print the text.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.158.213 (proxied: 103.255.7.8)
----
Manual Page -- https://php.net/manual/en/tutorial.useful.php
Edit -- https://main.php.net/note/edit/128109
Del: integrated -- https://main.php.net/note/delete/128109/integrated
Del: useless -- https://main.php.net/note/delete/128109/useless
Del: bad code -- https://main.php.net/note/delete/128109/bad+code
Del: spam -- https://main.php.net/note/delete/128109/spam
Del: non-english -- https://main.php.net/note/delete/128109/non-english
Del: in docs -- https://main.php.net/note/delete/128109/in+docs
Del: other reasons-- https://main.php.net/note/delete/128109
Reject -- https://main.php.net/note/reject/128109
Search -- https://main.php.net/manage/user-notes.php