Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Using include() Within a Loop

Mon Oct 27, 2008 1:05 pm

Code:
<html>
<head>
<title>Using include() within a loop</title>
</head>
<body>
<?php
for ( $x = 1; $x<=3; $x++ ) {
   
$incfile = "incfile$x".".txt";
   print
"Attempting include $incfile<br>";
   include(
"$incfile" );
   print
"<p>";
}
?>
</body>
</html>




Post a reply
  Related Posts  to : Using include() Within a Loop
 PHP Include     -  
 Require vs Include in php     -  
 get include path     -  
 Using include function     -  
 jsp include directive not working     -  
 Do while loop     -  
 C++ While loop     -  
 do while loop and for loop C++ example help.     -  
 While loop     -  
 I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER     -  

Topic Tags

PHP Loops, PHP Functions