Pass id with link

I want to pass an id with a link. Version one of the links below works, not the second one. Can anybody explain why?

  1. $head=“<a href=\“index.php?id=” . $row[0] . “\”>” . $row[1] . “</a>”;
  2. $head=“<a href=‘index.php?id=’ . $row[0]>” . $row[1] . “</a>”;

Thank you very much!

You seem to have a problem with single and double quotes!

  1. $head=“<a href='index.php?id=”.$row[0].“'>”.$row[1].“</a>”;
  2. $head=“<a href='index.php?id=”.$row[0].“'>”.$row[1].“</a>”;

Try that!

Damn right! :smiley: Thank you very much!