Jump to content


Photo

elseif($action == "view")


  • Please log in to reply
2 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 22 September 2006 - 02:08 PM

with elseif can u have

elseif($action == "view") or ($action == "")

or something similar?

or do i need

elseif($action == "view")
{
}
elseif($action == "")
{
}

#2 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 22 September 2006 - 02:11 PM

else if($action == 'view' || $action == 'something_else')
{

}
The code inside the block will be run if $action is view or something_else.

else if($action == 'view')
{

}
else if($action == 'something_else')
{

}
The code inside block 1 will be run if $action is view and the code inside block 2 will be run if $action is something_else

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 22 September 2006 - 02:22 PM

else if($action == 'view' || $action == 'something_else')
{

}

thank you very much...

exactly what I wanted....




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users