user1548769
user1548769

Reputation: 319

Adding php variable to <a href name part

Here is my code there is plenty more but these work independently

echo $row['Queue'];
echo "<a href=\"modifyp.php?id=" . $row['id1'] . "\">Modify</a>";

what I want to do is this

echo "<a href=\"modifyp.php?id=" . $row['id1'] . "\">$row['Queue']</a>";

this doesn't work and gives a syntax error. any tips on how to get this to work?

thanks!

Upvotes: 0

Views: 995

Answers (2)

triclosan
triclosan

Reputation: 5714

echo "<a href=\"modifyp.php?id=" . $row['id1'] . "\">".$row['Queue']."</a>";

Upvotes: 1

Kuba Wyrostek
Kuba Wyrostek

Reputation: 6221

This would be:

echo "<a href=\"modifyp.php?id=" . $row['id1'] . "\">" . $row['Queue'] . "</a>";

Upvotes: 1

Related Questions