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 Link to comment https://forums.phpfreaks.com/topic/129212-variable-to-url/ 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> Link to comment https://forums.phpfreaks.com/topic/129212-variable-to-url/#findComment-669882 Share on other sites More sharing options...
MasterACE14 Posted October 20, 2008 Share Posted October 20, 2008 you should also look into $_GET Link to comment https://forums.phpfreaks.com/topic/129212-variable-to-url/#findComment-669887 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.