if(true):
echo 'good';
endif;
Ben bugün sadece PHP görmek ettik!
Ben hep kullanıyorum:
if(true)
{
echo 'good';
}
Bu Alternative syntax for control structures olduğunu.
Quoting that page of the manual :
PHP offers an alternative syntax for some of its control structures; namely,
if
,while
,for
,foreach
, andswitch
. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:
) and the closing brace toendif;
,endwhile;
,endfor;
,endforeach;
, orendswitch;
, respectively.
I don't often see it used in "pure PHP" files, but it's quite often used when PHP is mixed with HTML in the same file -- i.e. when used as a templating language.
Sen çok kolay html ile eski geçmeli olabilir.
http://php.net/manual/en/control-structures.alternative-syntax.php