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     -  
 Using include function     -  
 Require vs Include in php     -  
 get include path     -  
 jsp include directive not working     -  
 do while loop and for loop C++ example help.     -  
 While loop     -  
 Do while loop     -  
 C++ While loop     -  
 PIC Assembly For Loop Example     -  

Topic Tags

PHP Loops, PHP Functions