1,105,585 Community Members

include ranged files in php

Member Avatar
shandoosheri
Light Poster
42 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi how can i include a range of numbered files like
file1.php,file2.php,file4.php
i have tried this code but it didn't work

<?php foreach (range(0, 7) as $fileno) {
	
    include "files/file" + $fileno + ".php";}?>
Member Avatar
cwarn23
Occupation: Genius
3,028 posts since Sep 2007
Reputation Points: 387 [?]
Q&As Helped to Solve: 281 [?]
Skill Endorsements: 15 [?]
Team Colleague
Featured
 
0
 
<?php for($i=0;$i<8;$i++) include ("files/file".$i.".php"); ?>
Question Answered as of 2 Years Ago by cwarn23
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: