...

View Full Version : concatinate



buildrebuild
12-28-2006, 11:11 AM
Hi,
I have two bits of info I want added together to from a string in my XHTML.

This, which retrieves a variable...
$track = $_GET['track'];

and this
$URL = "http://www.buildrebuild.com/mp3/"

Will this work?
<?php echo($URL + $track); ?>

Or do I use...
<?php echo($URL.$track); ?>

Thx in advance,
CB

_Aerospace_Eng_
12-28-2006, 11:22 AM
In php you use dot. All you had to do was do a search on php.net for concatenate. Sometimes you can answer your own question by doing a little research yourself. Please do so in the future. Try things out. See if something works or not.

<?php echo $URL.$track; ?>
No need for the parentheses around the echo either.

buildrebuild
12-28-2006, 12:17 PM
Sorry.
I usually do a search. My head is fried at the mo'. No excuses...and thanks for the reply.

Best
CB



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum