Non Brazilian Non Brazilian - 9 months ago 34
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>';