<?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>Fri, 24 May 2013 13:03:15 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Tiffany Brown's Blog: Simple pagination for arrays with PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/11569</guid>
      <link>http://www.phpdeveloper.org/news/11569</link>
      <description><![CDATA[<p>
<i>Tiffany Brown</i> has a <a href="http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/">quick tutorial</a> on a pagination method she's come up with for splitting out array contents over multiple pages.
</p>
<blockquote>
While working on a recent project, I had to build a feature that displayed a list of files available in a directory. A simple way is just to use scandir() and a foreach loop to spit out a pretty list. There's a small problem though: long lists aren't all that user friendly. I decided instead to paginate the results. Here's one way to do it using PHP 5.
</blockquote>
<p>
Her method reads in all of the (valid) files from the directory, assigns them to an array and uses the <a href="http://php.net/array_chunk">array_chunk</a> function to split them up into groups on five. These groups can be easily looped through and displayed out as links easily.
</p>]]></description>
      <pubDate>Mon, 15 Dec 2008 08:48:20 -0600</pubDate>
    </item>
  </channel>
</rss>
