chmpdog Posted September 9, 2007 Share Posted September 9, 2007 Hi, I have a site that I recently added in SEO urls. Everything works great, but none of my links go to the seo. So I need a script that would add in a $variable before every link, automaticly. Since I am not too skilled in php is would be really hard or me. If you are a PHP guru out there could you whip this up or me? Thanks Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/ Share on other sites More sharing options...
dbo Posted September 9, 2007 Share Posted September 9, 2007 We don't write code for you. We help you, if you have questions... ask them. If you want someone to do it for you, check the freelance section. Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-344824 Share on other sites More sharing options...
chmpdog Posted September 9, 2007 Author Share Posted September 9, 2007 Sorry, Is there a place to find out where I can do this? A tutorial place? Thanks Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-344985 Share on other sites More sharing options...
tippy_102 Posted September 9, 2007 Share Posted September 9, 2007 If you post your current code, we might be able to help. Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-344992 Share on other sites More sharing options...
noidtluom Posted September 10, 2007 Share Posted September 10, 2007 Why don't you try the search and replace function on your text editor. The text editor I use (PSPad) has a pretty useful feature where when you are doing search and replace. You can ask it to prompt you for each replace. So I tell it to do a general replace, and just click yes/no. It gets the job done pretty quickly. Don't worry, I'm sure every single programmer has once done mindlessly boring work like that. I sure have. Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-345235 Share on other sites More sharing options...
liam1412 Posted September 10, 2007 Share Posted September 10, 2007 $variable = 'what to be added'; $link = $variable.'www.linkishere.com'; Thsi will add the variable to the beginning of the link Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-345257 Share on other sites More sharing options...
xyn Posted September 10, 2007 Share Posted September 10, 2007 i'm lost; can you explain the problem in mroe detail? Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-345261 Share on other sites More sharing options...
effigy Posted September 10, 2007 Share Posted September 10, 2007 Try Regular Expressions. Link to comment https://forums.phpfreaks.com/topic/68596-add-a-little-peice-of-code-in-front-of-every-link/#findComment-345325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.