RE: [PHP] Newbie "If" question

From: Date: Fri, 09 May 2003 14:36:32 +0000
Subject: RE: [PHP] Newbie "If" question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147023@lists.php.net to get a copy of this message
try this: if($permissao){ if($permissao==8){ include("criar_editoria.php"); } else { echo $permissao; } } else { echo "what do you want to do?"; } when i write if/else's i usually write the skeleton first...might be a good way for you to do so... the parse error ws a result of you having a ; after the } and not having {} with you last else, although they're with the associated if.... HTH, jack > -----Original Message----- > From: Dani Matielo [mailto:dmatielo@uol.com.br] > Sent: Friday, May 09, 2003 10:27 AM > To: php-general@lists.php.net > Subject: [PHP] Newbie "If" question > > > Hello, > > I am having problems with this string, it returns a "parse error" and I > can't find it... I appreciate any help. Thanx. :) > > <? > > if ($permissao) { > if ($permissao == 8) include ("criar_editoria.php"); > else echo $permissao; > }; > else echo "What do you want to do?"; > > ?> > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.476 / Virus Database: 273 - Release Date: 24/4/2003 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#147023) next »