Jump to content

Recommended Posts

It's a simple href, you really need to learn how to do things on your own, or at least try.  I see you ask questions here on a daily basis when you haven't even made an attempt yourself...

 

Try:

 

<a href="../gang_profile.php?id=MANS%20GANG"><?php echo "[".$gng['tag']."]";?></a>

 

yeah i know how to do that... but i mean i want the whole thing side the echo... i get confused with all the "s and /s

 

 

here is my attempt at what i  was trying to do...

echo "<a href=/"../gang_profile.php?id=MANS%20GANG">/"[/".$gng['tag']./"]/"</a>";

Link to comment
https://forums.phpfreaks.com/topic/163367-making-this-a-link/#findComment-861998
Share on other sites

No need for all those double quotes, then you have to escape them.  Just use a double quote for the entire string, so your variable will interpolate, single quotes for attributes, and curly brackets around your associative array to escape it:

 

echo "[{$gng['tag']}]";

Link to comment
https://forums.phpfreaks.com/topic/163367-making-this-a-link/#findComment-862005
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.