note 55947 added to function.strpos

From: Date: Thu, 18 Aug 2005 16:51:42 +0000
Subject: note 55947 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-93844@lists.php.net to get a copy of this message
This may have been used before, but I have been trying to get my FLASH files to be XHTML compliant. This is more of a work around using the strpos() and explode(). <?php $serv = explode(" " , $_SERVER["HTTP_USER_AGENT"]); $found = false; for($i=0; $i<count($serv); $i++){ $chunk = strpos($serv[$i], "Firefox"); if($chunk !== false || $serv[$i] == "Opera"){ $found = true; } } // IF NOT FIREFOX OR OPERA.. use the <object> tag if($found){ //<embed> tag }else{ //<object> tag ?> ---- Manual Page -- http://www.php.net/manual/en/function.strpos.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55947 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55947&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55947&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93844) next »