<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Display a customizeable list of files in a directory</title>
	<atom:link href="http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/</link>
	<description>Computer Help from your Friendly How-To Geek</description>
	<lastBuildDate>Sun, 08 Nov 2009 07:56:33 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: vick</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-73343</link>
		<dc:creator>vick</dc:creator>
		<pubDate>Mon, 15 Jun 2009 09:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-73343</guid>
		<description>sort($file);

For Accending order of file.</description>
		<content:encoded><![CDATA[<p>sort($file);</p>
<p>For Accending order of file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-73075</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Tue, 09 Jun 2009 13:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-73075</guid>
		<description>grr code doesnt show up properly in here. Never mind.</description>
		<content:encoded><![CDATA[<p>grr code doesnt show up properly in here. Never mind.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-73074</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Tue, 09 Jun 2009 13:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-73074</guid>
		<description>Ok so basically I want something that will find out what files are in a folder and then php include them into a previously built page.

Eg. listed/1.php
      listed/2.php
      listed/3.php
would show up as 




Now I could do this myself but I am expecting 100&#039;s of files that require including. This is what Ive got.

&#039;.&#039;&#039;;
          }
       }
  closedir($handle);
  }
?&gt;
List of files:




I think it has a problem using the </description>
		<content:encoded><![CDATA[<p>Ok so basically I want something that will find out what files are in a folder and then php include them into a previously built page.</p>
<p>Eg. listed/1.php<br />
      listed/2.php<br />
      listed/3.php<br />
would show up as </p>
<p>Now I could do this myself but I am expecting 100&#8217;s of files that require including. This is what Ive got.</p>
<p>&#8216;.&#8221;;<br />
          }<br />
       }<br />
  closedir($handle);<br />
  }<br />
?&gt;<br />
List of files:</p>
<p>I think it has a problem using the</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-70773</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Thu, 23 Apr 2009 17:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-70773</guid>
		<description>Thanks will try that!</description>
		<content:encoded><![CDATA[<p>Thanks will try that!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhrugesh</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-70748</link>
		<dc:creator>Bhrugesh</dc:creator>
		<pubDate>Thu, 23 Apr 2009 06:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-70748</guid>
		<description>well Eugene...
about the order u wanted to display...
it can&#039;t be helped if u want to keep the file names just like that...
because names are read as strings &amp; not numbers...
if u want 1,2, 3...10, 11, 12...21, 21, 23...
then u will have to rename files as 01, 02, 03 &amp; so on :)
hope this helps</description>
		<content:encoded><![CDATA[<p>well Eugene&#8230;<br />
about the order u wanted to display&#8230;<br />
it can&#8217;t be helped if u want to keep the file names just like that&#8230;<br />
because names are read as strings &amp; not numbers&#8230;<br />
if u want 1,2, 3&#8230;10, 11, 12&#8230;21, 21, 23&#8230;<br />
then u will have to rename files as 01, 02, 03 &amp; so on <img src='http://www.howtogeek.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
hope this helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-69984</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Wed, 08 Apr 2009 06:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-69984</guid>
		<description>Thank you very much! that would be great!</description>
		<content:encoded><![CDATA[<p>Thank you very much! that would be great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-69982</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Wed, 08 Apr 2009 06:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-69982</guid>
		<description>Great! Thank you so much Ege!</description>
		<content:encoded><![CDATA[<p>Great! Thank you so much Ege!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ege</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-69966</link>
		<dc:creator>Ege</dc:creator>
		<pubDate>Tue, 07 Apr 2009 22:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-69966</guid>
		<description>@Eugene;
because it didn&#039;t show up properly when I copied and pasted it. I will upload it as a text file and post the link here as soon as I get back home (which will be in two days)</description>
		<content:encoded><![CDATA[<p>@Eugene;<br />
because it didn&#8217;t show up properly when I copied and pasted it. I will upload it as a text file and post the link here as soon as I get back home (which will be in two days)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-69959</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Tue, 07 Apr 2009 20:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-69959</guid>
		<description>I have a problem with the arrangement of the list.

Example:

1.php
10.php
100.php
2.php
21.php
3.php

I would like it to display:

1.php
2.php
3.php
10.php

etc.

The code by Ege does not work.</description>
		<content:encoded><![CDATA[<p>I have a problem with the arrangement of the list.</p>
<p>Example:</p>
<p>1.php<br />
10.php<br />
100.php<br />
2.php<br />
21.php<br />
3.php</p>
<p>I would like it to display:</p>
<p>1.php<br />
2.php<br />
3.php<br />
10.php</p>
<p>etc.</p>
<p>The code by Ege does not work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/comment-page-1/#comment-69958</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Tue, 07 Apr 2009 20:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/programming/php-display-a-customizeable-list-of-files-in-a-directory/#comment-69958</guid>
		<description>Just insert the files like:

?php
 if ($handle = opendir(&#039;.&#039;)) {
   while (false !== ($file = readdir($handle)))
      {
          if ($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot; 
		   &amp;&amp; $file != &quot;NOT-TO-BE-IN-1.php&quot;
		   &amp;&amp; $file != &quot;NOT-TO-BE-IN-2.html&quot;
		   &amp;&amp; $file != &quot;NOT-TO-BE-IN-3.jpg&quot;
		   &amp;&amp; $file != &quot;&quot;
		   &amp;&amp; $file != &quot;&quot;
		   &amp;&amp; $file != &quot;&quot;
		   &amp;&amp; $file != &quot;&quot;
		   &amp;&amp; $file != &quot;&quot;
		  
		  )

Or have a look at: http://www.php.net/readdir There is almost anything you want there.. Cant find it now but there is code snips that you can choose whitch file types should be displayed.

I have a problem with the arrangement of the list.</description>
		<content:encoded><![CDATA[<p>Just insert the files like:</p>
<p>?php<br />
 if ($handle = opendir(&#8217;.')) {<br />
   while (false !== ($file = readdir($handle)))<br />
      {<br />
          if ($file != &#8220;.&#8221; &amp;&amp; $file != &#8220;..&#8221;<br />
		   &amp;&amp; $file != &#8220;NOT-TO-BE-IN-1.php&#8221;<br />
		   &amp;&amp; $file != &#8220;NOT-TO-BE-IN-2.html&#8221;<br />
		   &amp;&amp; $file != &#8220;NOT-TO-BE-IN-3.jpg&#8221;<br />
		   &amp;&amp; $file != &#8220;&#8221;<br />
		   &amp;&amp; $file != &#8220;&#8221;<br />
		   &amp;&amp; $file != &#8220;&#8221;<br />
		   &amp;&amp; $file != &#8220;&#8221;<br />
		   &amp;&amp; $file != &#8220;&#8221;</p>
<p>		  )</p>
<p>Or have a look at: <a href="http://www.php.net/readdir" rel="nofollow">http://www.php.net/readdir</a> There is almost anything you want there.. Cant find it now but there is code snips that you can choose whitch file types should be displayed.</p>
<p>I have a problem with the arrangement of the list.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
