What are the different ways of writing if conditional statements using PHP?
I know for example of the following
if($test == 1){
}else{
}
and
if($test == 1)
echo 'asdsa';
else
echo 'sdaaa';
What are the different ways of writing if conditional statements using PHP?
I know for example of the following
if($test == 1){
}else{
}
and
if($test == 1)
echo 'asdsa';
else
echo 'sdaaa';
There's the alternative control structure syntax:
if ($text == 1):
echo 'asdsa';
else:
echo 'asdsa';
endif;