PHP include by name
Posted
by Adrian M.
on Stack Overflow
See other posts from Stack Overflow
or by Adrian M.
Published on 2010-04-09T18:55:52Z
Indexed on
2010/04/09
19:03 UTC
Read the original article
Hit count: 293
Hello,
I have "content" folder which is full of other sub-directories named in the following way: "id1_1","id1_2", "id1_3" and other "id2_1", "id2_2" etc. Each of these folders contains a file "template.php", same name in all sub-directories.
The number of folders is dynamic so I need to find a way to import in "index.php" only the "template.php" from all the folders starting with "id_1_".
How can I do it? Thanks!
© Stack Overflow or respective owner