Answer the question
In order to leave comments, you need to log in
How to correctly display links from a record in a database table field?
Made alerts that are entered into the database table. Now, if you write down the notification "Thank you, follow the link", so that the link is on the word "link"? And then when I display a notification from the database, then there are problems with the transition. I don't know how to write correctly.
Answer the question
In order to leave comments, you need to log in
using yii2-html-helper
<?php
use yii\helpers\Html;//это - в самый верх файла
//что-то
$id = 'ид для тега';
$url = 'ваша ссылка';
echo Html::a('Ссылка', $url, ['class' => 'class', 'id' => $id]);
//что-то
$id = 'ид для тега';
$url = 'ваша ссылка';
echo "<a href='" . $url . "' id='" . $id . "'>Ссылка</a>";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question