Hi, all
I'm a newbe in php
My question is simple, but after 10 hours on the comp,I've got jammed
Please help on the correct syntax of echo ("<a href...

$ID[1]="Best Song"
$url[1]="http://localhost/cat_music/BS.php"

echo ("<a href='\".$url[1].'\">".$id[1]."</a>");

doesn't work
Installed PHP 5.2.5

TIA

echo "<a href=\"".$url[1]."\">".$id[1]."</a>";

try that instead

Tnx, Tommy,
After rest of 1 hour I've got it

echo ("<a href='$URL[1].'\">".$ID[1]."</a>");

No probs, just a little tip try I find it easier to stick to one style of quotes. For instance i normally always tend to use double quotes " and when need be escape them, I think your problem might have been avoided if you'd stuck to one convention as oppossed to mixing single and double quotes and concatenating some and not others.

Hope that makes sense.

Good luck

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.