maraesa1000
New member
I am trying to attach a variable extension to a hyperlink. I am trying to attach a variable called '$myvariable' to a URL
My hyperlink currently looks like this:
echo '<a href="test2.php?id=<?php print $myvariable; ?>>A function</a>';
I need it to be a PHP hyperlink as it is enclosed in a PHP 'while' loop. The hyperlink itself does works when outside of PHP tags (with the 'echo' removed) i just cant seem to get it to work!
Would hugely appreciate any suggestions!
if anyones curious how i did it, i enclosed each section of the URL into 'print' functions each on a seperate line on 3 lines.
My hyperlink currently looks like this:
echo '<a href="test2.php?id=<?php print $myvariable; ?>>A function</a>';
I need it to be a PHP hyperlink as it is enclosed in a PHP 'while' loop. The hyperlink itself does works when outside of PHP tags (with the 'echo' removed) i just cant seem to get it to work!
Would hugely appreciate any suggestions!
if anyones curious how i did it, i enclosed each section of the URL into 'print' functions each on a seperate line on 3 lines.