PDA

View Full Version : concatenate variable into url


tangosdad
06-28-2008, 01:10 AM
Hi folks,

Another newbie question here. How do I concatenate a variable into a URL?

For example:

echo "<a href=http://www.website.com/ref=$id_numb>Go To Website</a>";

$id_numb is coming out of the database, let's say it's value is 12345 and I want to build the url above so when the user clicks on the link they go to:

http://www.website.com/ref=12345

I've tried all different combinations I can think of but I'm not getting anywhere. Can someone help me out?

Thanks!

tangosdad
06-28-2008, 01:18 AM
uh, never mind. I got it!

davidj
06-28-2008, 01:22 AM
you actually got it right in your example