-1

I'm having some weird problem escaping " in an echo function.

        echo "<a href=\"" + "$site" +  "target=\"_blank\">Site</a>";

Any idea what I'm doing wrong?

Luis Melo
  • 3
  • 1

1 Answers1

0

You are doing it the javascript way for one. Concatenating in PHP works using . or ,. Then you are using to many "

Try this line:

echo "<a href=\"".$site." target=\"_blank\">Site</a>";
Yolo
  • 1,569
  • 1
  • 11
  • 16