在url kohana中包裹div

I am using kohana framework.

I am trying wrap a url in a div in other to make the div clickable. I normally do it like this

<a href "www.test.com">
  <div class="foo1>
       <div class="foo2">
       <?php   ?>
       </div>
  </div>
</a>

but in this case I am using this framework.

the div I am trying to wrap as other div and those div as php tags

I am trying to wrap this

<?php echo HTML::anchor($link .$test1->getid(). '/travel'); ?>

any idea how I will wrap this in in a div

or Make <?php echo HTML::anchor($link .$test1->getid(). '/travel'); ?> work on jquery window.location

The second parameter is the text that will be shown as the title/text inside the a tag, check the documentation for HTML::anchor

Maybe this will work.

<?php echo HTML::anchor($link .$test1->getid(). '/travel', <div class="foo1"><div class="foo2">your content</div></div>); ?>

Please note that putting divs in anchor tags may not be semantically right.