I have this code:
<?php echo $form->fileField($model, 'avatar_url', array('style' => 'display:none')) ?>
<a href="#" class="thumbnail" style="width: 96px" id="avatar">
<?php if (empty($model->avatar_url)) { ?>
<img data-src="holder.js/96x96" id="avatar-img">
<?php } else { ?>
<img src="<?= Yii::app()->baseUrl . $model->avatar_url ?>" id="avatar-img">
<?php } ?>
When I replace <?php
to <?
, the code does not work and the browser shows an error.
PHP notice Undefined variable: class
Maybe I missed an extension in PHP?