I agree it's cleaner. I hate to be picky, but by nesting the span inside the link the output is:
<a href="/"><span class="welcome">Hello World</span></a> (in other words the <span> tag is visible in the output). Not sure if this is a limitation of $html->link? On Nov 19, 5:32 pm, mike karthauser <[email protected]> wrote: > On Thu, 2009-11-19 at 09:28 -0800, jburns wrote: > > > Or you could nest them... > > > echo $html->tag('span', $html->link('Hello World', '/'), array('class' > > => 'welcome')); > > you've actually got this the opposite of what was asked for. > > echo $html->link($html->tag('span','Hello > World',array('class'=>'welcome')),array('escape'=>false)); > > far cleaner to add a class to the anchor and not bother with the span > though. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
