Jump to content

making this a link...


seany123

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

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.