denoteone Posted April 8, 2009 Share Posted April 8, 2009 if I have a variable like so $pagetitle = "Thank You page" $mylink = "<a href='mysite.com?title=$pagetitle'>click hereM</a>"; echo $mylink; would that show a click here link that goes to mysite.com?title=Thank You Page also if I insert $mylink into a database will that work so I can later retrieve the link from the database? Link to comment https://forums.phpfreaks.com/topic/153181-html-tags-in-a-php-variable/ Share on other sites More sharing options...
Maq Posted April 8, 2009 Share Posted April 8, 2009 No, you would probably only see "thank" cause it will get cut off after the space. You need to use urlencode. Link to comment https://forums.phpfreaks.com/topic/153181-html-tags-in-a-php-variable/#findComment-804662 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.