为什么有不同的语法相同的结果?
例如
# Example 1
if($myCondition == true) :
#my code here
endif;
if($myCondition == true) {
#my code here
}
# Example 2
foreach($films as $film) :
#my code here
endforeach;
foreach($films as $film) {
#my code here
}
另外我已经使用<?=
了很长时间,现在我知道它已被弃用,我应该使用<?php echo
这种情况,为什么?每次都要写出来更烦人。
你怎么认为?