Hello all,
just a quick question regarding processing speed.
I use a short script to read information from the referrer and include files and images according to these results.
There are 7 different conditons that can occor (keyords in referrer) including the default.
The question is: is it faster to use the
if / else if statements or the
case statement to make the appropriate selections.
Code snippet see below.
Thanks for your kind advice.
$referer = strtolower($_SERVER["HTTP_REFERER"]);
if (strstr($referer,"keyword1"))
{
include ("www.example.com/includefile1.inc");
}
else if (strstr($referer,"keyword2"))
...