Reply to conditional preg match

Your name:

Reply:


Posted by toedipper on 09/29/05 23:49

Hello,

The following bit of code does a preg match and does something if true
(sets $browser to ppcie)

Without using if then and else's how do I code it so it does not equal
what it is testing for? So if it does not find ppc in the $agent then
it does something else/sets it to something else?

$agent = getenv("HTTP_USER_AGENT");
if (preg_match("/PPC/i", "$agent")) {
$browser = 'PPCIE';
}

Thanks,

td.
www.pocketpcheaven.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация