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'); ?> 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. 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
Archived
This topic is now archived and is closed to further replies.