Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: PoLlama - heinäkuu 08, 2007, 02:17:48 IP

Otsikko: Ifs in Ifs?
Kirjoitti: PoLlama - heinäkuu 08, 2007, 02:17:48 IP
With PHP, can you make a if then statement in a if then statement with PHP, or does it have to be If ... ElseIf .
Otsikko: Re: Ifs in Ifs?
Kirjoitti: Thantos - heinäkuu 08, 2007, 02:20:58 IP

if (cond)
{
    if (another cond)
    {
      if (yet another condition)
         // etc
    }
}
Otsikko: Re: Ifs in Ifs?
Kirjoitti: PoLlama - heinäkuu 08, 2007, 02:24:38 IP
Great that means the parse error is something hard to find. I'm glad I can do Ifs in Ifs though.