Skip to content Skip to sidebar Skip to footer

How To Echo A Hyperlink With A Variable?

Getting these hyperlinks right and mixing HTML with PHP seems to be a constant source of sorrow for me. Whats wrong with this hyperlink? echo '

Solution 1:

it should be

echo'<a href = "googler.php?query='.$suggestion[$ss_count].'">'.$suggestion[$ss_count].'</a><br>';

Within single quotes variables are not interpolated so you have to pull the link text out of the string literal.

Solution 2:

try it ..!!

echo'<a href = "googler.php?query='.$suggestion[$ss_count].'">'.$suggestion[$ss_count].'</a><br>';

Solution 3:

you all missing the point.

JUST USE BACKSLASH

Post a Comment for "How To Echo A Hyperlink With A Variable?"