|
-
Jan 31st, 2008, 02:13 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] error on simple switch statement
Parse error: syntax error, unexpected T_DEFAULT
Code:
// Script flow
switch($mod) {
case 'doadd':
die('executed doadd code');
break;
case default:
addgroup();
break;
}
error occurs around the "case defualt" line. Can't see anything wrong.
-
Jan 31st, 2008, 02:21 AM
#2
Re: error on simple switch statement
Just 'default', not 'case default'.
-
Jan 31st, 2008, 06:23 PM
#3
Thread Starter
Hyperactive Member
Re: error on simple switch statement
 Originally Posted by penagate
Just 'default', not 'case default'.
Bangs head on desk.
Thanks dude will try this out later in the morning when I get the chance. Sunny Adelaide huh Hosing down over here in Sydney at the moment.
That fixed that one up. Not the world's leading expert on php so expect a torrent of questions as have an old software package that I'm rewriting to utilise modern web design and stuff.
Last edited by KiwiDexter; Jan 31st, 2008 at 08:14 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|