PHP Help with "if" statement to dynamically include files

Posted by Adrian M. on Stack Overflow See other posts from Stack Overflow or by Adrian M.
Published on 2010-04-27T21:51:25Z Indexed on 2010/04/27 21:53 UTC
Read the original article Hit count: 347

Filed under:
|
|
|
|

Hello,

I have these files:

"id_1_1.php", "id_1_2.php", "id_1_3.php" etc "id_2_1.php", "id_2_2.php", "id_2_3.php" etc

the number of files is not known because will always grow..

all the files are in same directory..

I want to make a if statement:

  1. to include the files only if their name ends with "_1"
  2. another function to load all the files that start with "id_1"

How can I do this? Thank you!

© Stack Overflow or respective owner

Related posts about php

Related posts about include