Using include() Within a Loop : Include : Language Basics PHP Source Code


PHP Source Code » Language Basics » Include »

 

Using include() Within a Loop





<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>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Include