<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 20:43:10 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPCodeBase.com: PHP Magic Function : glob()]]></title>
      <guid>http://www.phpdeveloper.org/news/16134</guid>
      <link>http://www.phpdeveloper.org/news/16134</link>
      <description><![CDATA[<p>
On PHPCodeBase.com there's a recent post looking at <a href="http://www.phpcodebase.com/php-magic-function-glob/">a handy file system function</a> that you can use to search directories simpler than a usual opendir/readdir method - <a href="http://php.net/glob">glob</a>.
</p>
<blockquote>
Are you guys still using <a href="http://php.net/manual/en/function.opendir.php">opendir()</a> function to read the the files from the folder in PHP? Luckily PHP have the <a href="http://php.net/manual/en/function.glob.php">glob()</a> function which perform this task very faster and smarter.
</blockquote>
<p>
He compares an example of the opendir/readdir method to a few line replacement with glob, both searching the same directory for files. He looks at the arguments you can pass into glob - the path to search and a flag that adds special handling to the method (like turning off sorting, modifying the regular expression handling and stopping on errors).
</p>]]></description>
      <pubDate>Fri, 01 Apr 2011 08:21:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Quick Tip: Loop Through Folders with PHP's Glob() ]]></title>
      <guid>http://www.phpdeveloper.org/news/14419</guid>
      <link>http://www.phpdeveloper.org/news/14419</link>
      <description><![CDATA[<p>
Sometimes when you're looking through the filesystem in your PHP application, you just need a quick and easy way to grab a file listing from a directly and move on. Sure, you can use the usual <a href="http://php.net/opendir">opendir</a> and <a href="http://php.net/readdir">readdir</a> combo to loop through the files, but there's another function that might suit your needs better - <a href="http://php.net/glob">glob</a>. In <a href="http://net.tutsplus.com/tutorials/php/quick-tip-loop-through-folders-with-phps-glob">this quick tutorial</a> from NETTUTS.com today they show you how it works.
</p>
<blockquote>
Are you still using opendir() to loop through folders in PHP? Doesn't that require a lot of repetitive code everytime you want to search a folder? Luckily, PHP's glob() is a much smarter solution.
</blockquote>
<p>
They include code examples showing how the usual opendir/readdir code can be translated over to an example using glob and mention the two arguments you can use - a pattern-matching search string and a modifier to change settings on the search and on the results returned.
</p>]]></description>
      <pubDate>Tue, 27 Apr 2010 11:49:15 -0500</pubDate>
    </item>
  </channel>
</rss>
