Non Brazilian Non Brazilian - 5 months ago 15x
PHP Question

php laravel echo blade html mistake

am try to echo this.

echo "<td><a href='{{ URL::to('index/watch/' . $tmpd) }}''>$tmpd </a></td>";

output must be http://localhost:8000/index/watch/myvar

but it also http://localhost:8000/%7B%7B%20URL::to(

what is my echo mistake


It is always good practice to use laravel helpers. The below code generates the html link that you are looking for.

echo '<td>'.link_to('index/watch/'.$tmpd.'', $tmpd).'</td>';