Jump to content

[SOLVED] include() with a foreach?


Michdd

Recommended Posts

I'm trying to use this:

 

foreach( $mon as $key => $monlist){

include('$monlist');


}

When $monlist are different file destinations, but when I try to do that I get this error:

 

Warning: include($monlist) [function.include]: failed to open stream: No such file or directory in /home/a3496022/public_html/add.php on line 146

 

Is there some other way to include something from a foreach statement?

Link to comment
https://forums.phpfreaks.com/topic/128941-solved-include-with-a-foreach/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.