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
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>';
As Mark Baker said don't include the whole statement in an echo but also for the url you need to use the unescaped tag {!! !!}:
<td><a href='{!! URL::to('index/watch/' . $tmpd) !!}'>{{ $tmpd }}</a></td>
echo statements.
{{...}}with PHP echo statements