We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,555 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

include ranged files in php

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";}?>
2
Contributors
1
Reply
37 Minutes
Discussion Span
1 Year Ago
Last Updated
2
Views
Question
Answered
shandoosheri
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
<?php for($i=0;$i<8;$i++) include ("files/file".$i.".php"); ?>
cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 261
Skill Endorsements: 13
Question Answered as of 1 Year Ago by cwarn23

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0644 seconds using 2.64MB