Hi, I am having trouble echoing something into a url.

The code I've got is:

<?php
$code = "kooks";
echo '<a href="http://website.com/'$code'">The Kooks</a>'; ?>

But I get the message: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /hermes/web11b/b146/moo.3finking/unsignedgigs/test.php on line 3

Thanks for your help

Recommended Answers

All 3 Replies

Thanks, I am slowly getting the hand of this...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.