jack5100nv Posted March 10, 2010 Share Posted March 10, 2010 I want to dynamically include a file. How can I do something like: <? include('myfolder/$filename.php'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/194832-can-i-pass-variables-to-php-include-function/ Share on other sites More sharing options...
Alex Posted March 10, 2010 Share Posted March 10, 2010 Just like that, but you need to use double quotes. Single quotes don't have variable interpolation. Quote Link to comment https://forums.phpfreaks.com/topic/194832-can-i-pass-variables-to-php-include-function/#findComment-1024462 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.