Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I comment a line with php short echo tag?

Tags:

php

yii2

In my yii2 framework there are lots of line with php short echo tags <?=

for example:

<?= Html::a('Create Medicine', ['create'], ['class' => 'btn btn-success']) ?>
<?= $form->field($model, 'medicine_name')->textInput(['maxlength' => 50]) ?>

I couldn't make out an easy way to comment out this lines without first changing the opening tag. is there an easy way to this?

Thanks.

like image 235
Pawan Avatar asked Jan 05 '15 18:01

Pawan


2 Answers

This should work for you:

<?= ""; stuff here ?>
like image 83
Rizier123 Avatar answered Nov 15 '22 00:11

Rizier123


I figure the easiest thing to do is replace <?= with <?php //, though it does change the opening tag...

for example

<?php //= Html::a('Create Medicine', ['create'], ['class' => 'btn btn-success']) ?>
<?php //= $form->field($model, 'medicine_name')->textInput(['maxlength' => 50]) ?>
like image 42
Joao Avatar answered Nov 15 '22 00:11

Joao