PHP 2
From Ilianko
Условни оператори
$myVar = 1; $myZero = 0; $myString = 'ilian'; $myZeroString = ;
echo '$myZero = $myVar'.var_dump( $myZero = $myVar);
var_dump(
Contents
if
if
$myVar = 'Ivan';
if($myVar == 'logged'){ echo 'You are logged'; }
echo 'Click Next';
if else
$myVar = 'Ivan';
if($myVar == 'logged'){ echo 'You are logged'; } else { echo 'Please login'; }
echo 'Click Next';
if elseif else
if($myVar == 'logged'){ $text = 'You are logged'; } elseif($myVar == 'guest') { $text = 'Please choose name'; } else $text = 'Please register
echo $text.'Click Next';