billshackle Posted March 2, 2006 Share Posted March 2, 2006 I have a script which is unique to each entry in my database. So what i am trying to do is name the scripts according to there ID and then include them on my page. E.g. i want to do something like <? include 'pages/pages<? echo $id ?>.php' ?> but i can't seem to figure it out, any idea's?Cheers Link to comment https://forums.phpfreaks.com/topic/3893-including-files-using-an-id/ Share on other sites More sharing options...
Snip Posted March 2, 2006 Share Posted March 2, 2006 Stringconcatenation is done by using '.'<?$next_page="pages/page".$id.".php";include "$next_page";?> Link to comment https://forums.phpfreaks.com/topic/3893-including-files-using-an-id/#findComment-13489 Share on other sites More sharing options...
billshackle Posted March 2, 2006 Author Share Posted March 2, 2006 cheers pal, Worked a treat. Link to comment https://forums.phpfreaks.com/topic/3893-including-files-using-an-id/#findComment-13493 Share on other sites More sharing options...
heckenschutze Posted March 2, 2006 Share Posted March 2, 2006 Remember that quoting is for strings, no need to quote a variable.[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][code]include "$next_page";[/code][/quote] Link to comment https://forums.phpfreaks.com/topic/3893-including-files-using-an-id/#findComment-13507 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.