note 55947 deleted from function.strpos by victor

From: Date: Thu, 18 Aug 2005 18:13:42 +0000
Subject: note 55947 deleted from function.strpos by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93850@lists.php.net to get a copy of this message
Note Submitter: wilzdezign at gmail dot com ---- 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 ?>

« previous php.notes (#93850) next »