hotliquer Posted October 20, 2008 Share Posted October 20, 2008 Hi, I have searched but cannot find a solution to this very small problem. Can anyone tell me the right way to do this? I need to declare a $variable at the top of the page. and have it print out inside link URLs. Example: $variable = ("photos"); ?> <a href="http://www.site.com/<?php $variable ?>">TEXT</a> Can anyone tell me the right way to do this? Thanks Ben Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted October 20, 2008 Share Posted October 20, 2008 $variable = "photos"; Then in your link: <a href="http://www.site.com/<?php echo $variable; ?>">Link Text</a> Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted October 20, 2008 Share Posted October 20, 2008 you should also look into $_GET Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.