Jump to content

Stupid question. But need help :-)


xacto

Recommended Posts

Stupid question probably pretty obvious. but..

I am trying to add a href to an image echo And I can't seem to code this right.

 

Here is a text link echo call:

echo '<div id="nav_image_title" align="center" valign="middle" ><a href="'. $sess->url( URL .'index.php?page=shop.browse&category_id=' . $categories[$kp]['category_child_id']). '">'.$categories[$kp]['category_name'].'</a></div>';

And I want to add that "a href" to this image:

echo '<div>'. ps_product::image_tag( $categories[$kp]["category_thumb_image"], "alt=\"".$categories[$kp]["category_name"]."\"", 0, "category") . '</div>';

I not sure if it's just too many hours working today..

But how do I add that link to that image.

 

Thanks for any help anyone can give..

!!!

 

 

Link to comment
https://forums.phpfreaks.com/topic/218608-stupid-question-but-need-help/
Share on other sites

Sorry everyone spent 40 minutes on that and it turned out I was missing a single quote (') opps

Thanks though.. Long day..  ::)

 

echo '<div> <a href="'. $sess->url( URL .'index.php?page=shop.browse&category_id=' . $categories[$kp]['category_child_id']). '">' . ps_product::image_tag( $categories[$kp]["category_thumb_image"], "alt=\"".$categories[$kp]["category_name"]."\"", 0, "category") . '</a></div>';

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.