Yii2 Html A

[Solved] Yii2 Html A | Php Frameworks Yii - Code Explorer | yomemimo.com
Question : yii2 html a

Answered by : nutty-narwhal-xpaxojtg3g20

<?= Html::a('Profile', ['user/view', 'id' => $id], ['class' => 'profile-link']) ?>
//The first argument is the display text.
//It's not encoded, so if you're using data entered by the user, you need to encode it with Html::encode().
//The second argument is what will be in the href attribute of the <a tag. See Url::to() for details on what values it accepts.
//The third argument is an array of tag attributes.

Source : https://www.yiiframework.com/doc/guide/2.0/en/helper-html | Last Update : Tue, 19 Jul 22

Answers related to yii2 html a

Code Explorer Popular Question For Php Frameworks Yii