Click to See Complete Forum and Search --> : Switch
The Hobo
Jun 3rd, 2002, 10:09 AM
Is a switch statement done in PHP just as it is in C++?
The Hobo
Jun 3rd, 2002, 10:40 AM
Yes, it is:
switch ($i) {
case 0:
print "i equals 0";
break;
case 1:
print "i equals 1";
break;
case 2:
print "i equals 2";
break;
}
Thanks!
filburt1
Jun 3rd, 2002, 11:43 AM
No problem!
Remember there's default too
The Hobo
Jun 3rd, 2002, 11:14 PM
You betcha ;)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.