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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.