Hello, all!
I've been interested in learning PHP for awhile now and I'm hoping I can pick up lots of tips and trix here at the forum. I must admit, most of php seems so foreign to me, but I'm really wanting to learn!
Take Care!!
"A proof is a proof. What kind of a proof? It's a proof. A proof is a proof. And when you have a good proof, it's because it's proven." -- Jean Chrétien
if ($user=="Southpaw41") {
$key=9; // from the good ol'e U.S.A. ...
} elseif ($user=="OwenTheSamoan") {
$key=42; //Samoan greeting is 42nd in array
} elseif ($user=="Weedpacket") {
$key=31; // Heh ....
} else { /* D@m$##! Forgot that we didn't
bother to find out who we were greeting!
Hrmmm... what to do!! Heck, just pick one
at random... */
$greetcount=count($greetz); // get the # of greetings
$key=rand(0,$greetcount); // pick one at random
}
echo $greetz[$key]." to PHPBuilder!";
?>
Last edited by dalecosp; 02-11-2006 at 01:55 PM.
Reason: optimization, heh...
/!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade!/!!!\ ereg() is deprecated --- don't use it!
dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket
Welcome aboard. You should find lots of helpfull people here. If your just getting started, theres a nice free book avaliable here that should really help to get you on your way.
Bookmarks