我joomla今天一直在阅读一些代码,我经常遇到如下语句:
<?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
<tr>
<td colspan="2" class="modifydate"><?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?> </td>
</tr>
<?php endif; ?>
Run Code Online (Sandbox Code Playgroud)
我读它的方式,似乎转换为以下语法:
if (condition) :
// do something here
endif;
Run Code Online (Sandbox Code Playgroud)
我不熟悉这种语法(:在if语句之后).谁能指引我到正确的地方?