Non Brazilian Non Brazilian - 1 year ago 90
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

Answer Source

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>';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download