Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

yii2 html a

<?= 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 by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #html
ADD COMMENT
Topic
Name
1+8 =