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
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>';

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.