if (expression)
{
... PHP statements ...
}
if (expression)
{
... PHP statements ...
}
else
{
... PHP statements ...
}
if (expression 1)
{
... PHP statements ...
}
elseif(expression 2)
{
... PHP statements ...
}
else
{
... PHP statements ...
}
switch ($variable)
{ case "stringvalue1":
... PHP statements 1 ...
break;
case "stringvalue2":
... PHP statements 2...
break;
default:
... PHP default statements ...
}
while( condition )
{
... PHP statements ...
}
for( condition1 ; condition2 ; condition3)
{
... PHP statements ...
}
do
{
... PHP statements ...
}
while(condition);