phpretard Posted February 22, 2008 Share Posted February 22, 2008 How can I make this statement work? The link =<a href='index.php?page=contact'>Link</a> $_GET['page'] include (folder/$page.php'); The above doesn't work. Any help? -Anthony Link to comment https://forums.phpfreaks.com/topic/92366-include-with-a-variable/ Share on other sites More sharing options...
sasa Posted February 22, 2008 Share Posted February 22, 2008 $page=$_GET['page']; include ("folder/$page.php"); Link to comment https://forums.phpfreaks.com/topic/92366-include-with-a-variable/#findComment-473242 Share on other sites More sharing options...
phpretard Posted February 22, 2008 Author Share Posted February 22, 2008 It worked great but what's the differnece between ' and " ? (if you don't mind sharing) Link to comment https://forums.phpfreaks.com/topic/92366-include-with-a-variable/#findComment-473244 Share on other sites More sharing options...
sasa Posted February 22, 2008 Share Posted February 22, 2008 try $a = 'sasa'; echo '$a'; echo "<br />\n"; echo "$a"; and you can see Link to comment https://forums.phpfreaks.com/topic/92366-include-with-a-variable/#findComment-473249 Share on other sites More sharing options...
drisate Posted February 22, 2008 Share Posted February 22, 2008 you can use vars only in double quotes ;-) Link to comment https://forums.phpfreaks.com/topic/92366-include-with-a-variable/#findComment-473252 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.