<?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: Simple pagination for arrays with PHP 5</title>
	<atom:link href="http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/</link>
	<description>A web log about web development and internet culture with frequent detours into other stuff.</description>
	<lastBuildDate>Fri, 03 Feb 2012 12:47:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Anonymous</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-92139</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 04 Dec 2009 05:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-92139</guid>
		<description>I wrote this tutorial for a beginner-intermediate PHP programmer. I wanted to keep the focus on the pagination code rather then on the database As many new PHP programmer still don’t use PDO or any other database abstraction layer, I felt it was necessary to keep the database part simple. Someone using PDO can easily adapt the above without much changes. By &lt;a href=&quot;http://www.hostseeq.com/business/car-insurance.htm&quot;&gt;auto insurance&lt;/a&gt; company</description>
		<content:encoded><![CDATA[<p>I wrote this tutorial for a beginner-intermediate PHP programmer. I wanted to keep the focus on the pagination code rather then on the database As many new PHP programmer still don’t use PDO or any other database abstraction layer, I felt it was necessary to keep the database part simple. Someone using PDO can easily adapt the above without much changes. By <a href="http://www.hostseeq.com/business/car-insurance.htm">auto insurance</a> company</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Reynolds</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91881</link>
		<dc:creator>Matthew Reynolds</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91881</guid>
		<description>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me &lt;i&gt;much&lt;/i&gt; time. Thanks so much!

edit:

Would there be a way to order them the opposite way? (like rsort) Can&#039;t figure that one out...</description>
		<content:encoded><![CDATA[<p>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me <i>much</i> time. Thanks so much!</p>
<p>edit:</p>
<p>Would there be a way to order them the opposite way? (like rsort) Can&#8217;t figure that one out&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Reynolds</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93386</link>
		<dc:creator>Matthew Reynolds</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93386</guid>
		<description>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me &lt;i&gt;much&lt;/i&gt; time. Thanks so much!

edit:

Would there be a way to order them the opposite way? (like rsort) Can&#039;t figure that one out...</description>
		<content:encoded><![CDATA[<p>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me <i>much</i> time. Thanks so much!</p>
<p>edit:</p>
<p>Would there be a way to order them the opposite way? (like rsort) Can&#8217;t figure that one out&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Reynolds</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91880</link>
		<dc:creator>Matthew Reynolds</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91880</guid>
		<description>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me &lt;i&gt;much&lt;/i&gt; time. Thanks so much!</description>
		<content:encoded><![CDATA[<p>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me <i>much</i> time. Thanks so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Reynolds</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93385</link>
		<dc:creator>Matthew Reynolds</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93385</guid>
		<description>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me &lt;i&gt;much&lt;/i&gt; time. Thanks so much!</description>
		<content:encoded><![CDATA[<p>Perfect! I was wondering if pagination would be possible without MySQL and only with an array with the contents of a directory. Saved me <i>much</i> time. Thanks so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Toman</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91843</link>
		<dc:creator>Al Toman</dc:creator>
		<pubDate>Sat, 21 Nov 2009 02:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91843</guid>
		<description>Yeah, that&#039;s pretty much what I did after playing around a bit.  I tested it out on a simple gallery I wanted: &lt;a href=&#039;http://studio9webdesigns.com/upload2/gallery.php&#039; rel=&quot;nofollow&quot;&gt;gallery&lt;/a&gt;

I think it works cool, hey!?!

The error I got before I modified the script is:
&lt;em&gt;Warning: Invalid argument supplied for foreach() in ...&lt;/em&gt;

Thanks for the tut!</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s pretty much what I did after playing around a bit.  I tested it out on a simple gallery I wanted: <a href='http://studio9webdesigns.com/upload2/gallery.php' rel="nofollow">gallery</a></p>
<p>I think it works cool, hey!?!</p>
<p>The error I got before I modified the script is:<br />
<em>Warning: Invalid argument supplied for foreach() in &#8230;</em></p>
<p>Thanks for the tut!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Toman</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93384</link>
		<dc:creator>Al Toman</dc:creator>
		<pubDate>Sat, 21 Nov 2009 02:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93384</guid>
		<description>Yeah, that&#039;s pretty much what I did after playing around a bit.  I tested it out on a simple gallery I wanted: &lt;a href=&quot;http://studio9webdesigns.com/upload2/gallery.php&quot; rel=&quot;nofollow&quot;&gt;gallery&lt;/a&gt;

I think it works cool, hey!?!

The error I got before I modified the script is:
&lt;em&gt;Warning: Invalid argument supplied for foreach() in ...&lt;/em&gt;

Thanks for the tut!</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s pretty much what I did after playing around a bit.  I tested it out on a simple gallery I wanted: <a href="http://studio9webdesigns.com/upload2/gallery.php" rel="nofollow">gallery</a></p>
<p>I think it works cool, hey!?!</p>
<p>The error I got before I modified the script is:<br />
<em>Warning: Invalid argument supplied for foreach() in &#8230;</em></p>
<p>Thanks for the tut!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffany</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91836</link>
		<dc:creator>tiffany</dc:creator>
		<pubDate>Fri, 20 Nov 2009 15:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91836</guid>
		<description>hi al, what&#039;s the error you&#039;re getting?

in any case, the important part is that the first page link reads &#039;1&#039; and not &#039;0,&#039; right? so instead, use your code and add +1 to $i when it is printed to the page.</description>
		<content:encoded><![CDATA[<p>hi al, what&#8217;s the error you&#8217;re getting?</p>
<p>in any case, the important part is that the first page link reads &#8217;1&#8242; and not &#8217;0,&#8217; right? so instead, use your code and add +1 to $i when it is printed to the page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffany</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93383</link>
		<dc:creator>tiffany</dc:creator>
		<pubDate>Fri, 20 Nov 2009 15:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93383</guid>
		<description>hi al, what&#039;s the error you&#039;re getting?

in any case, the important part is that the first page link reads &#039;1&#039; and not &#039;0,&#039; right? so instead, use your code and add +1 to $i when it is printed to the page.</description>
		<content:encoded><![CDATA[<p>hi al, what&#8217;s the error you&#8217;re getting?</p>
<p>in any case, the important part is that the first page link reads &#8217;1&#8242; and not &#8217;0,&#8217; right? so instead, use your code and add +1 to $i when it is printed to the page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Toman</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91833</link>
		<dc:creator>Al Toman</dc:creator>
		<pubDate>Fri, 20 Nov 2009 13:13:28 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91833</guid>
		<description>Hello Tiffany,
The statement &lt;code&gt;for($i=1; $i&lt; count($pages)+1; $i++):&lt;/code&gt; fails for me.  I have 7 files in the test directory set at 5 per page.  It brings up pages [1] and [2].  Clicking on [1] shows files 6 -7 and clicking on [2] results in an error statement.

However, if I modify the statement to &lt;code&gt;for($i=0; $i&lt; count($pages); $i++):&lt;/code&gt; it brings up pages [0] and [1].  Clicking on [0] shows the first 5 files and clicking on [1] shows the next 2 files out of the seven.

The later works very nicely.

What may I be doing wrong!?!

Thanks,
Al</description>
		<content:encoded><![CDATA[<p>Hello Tiffany,<br />
The statement <code>for($i=1; $i&lt; count($pages)+1; $i++):</code> fails for me.  I have 7 files in the test directory set at 5 per page.  It brings up pages [1] and [2].  Clicking on [1] shows files 6 -7 and clicking on [2] results in an error statement.</p>
<p>However, if I modify the statement to <code>for($i=0; $i&lt; count($pages); $i++):</code> it brings up pages [0] and [1].  Clicking on [0] shows the first 5 files and clicking on [1] shows the next 2 files out of the seven.</p>
<p>The later works very nicely.</p>
<p>What may I be doing wrong!?!</p>
<p>Thanks,<br />
Al</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Toman</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93382</link>
		<dc:creator>Al Toman</dc:creator>
		<pubDate>Fri, 20 Nov 2009 13:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93382</guid>
		<description>Hello Tiffany,
The statement &lt;code&gt;for($i=1; $i&lt; count($pages)+1; $i++):&lt;/code&gt; fails for me.  I have 7 files in the test directory set at 5 per page.  It brings up pages [1] and [2].  Clicking on [1] shows files 6 -7 and clicking on [2] results in an error statement.

However, if I modify the statement to &lt;code&gt;for($i=0; $i&lt; count($pages); $i++):&lt;/code&gt; it brings up pages [0] and [1].  Clicking on [0] shows the first 5 files and clicking on [1] shows the next 2 files out of the seven.

The later works very nicely.

What may I be doing wrong!?!

Thanks,
Al</description>
		<content:encoded><![CDATA[<p>Hello Tiffany,<br />
The statement <code>for($i=1; $i&lt; count($pages)+1; $i++):</code> fails for me.  I have 7 files in the test directory set at 5 per page.  It brings up pages [1] and [2].  Clicking on [1] shows files 6 -7 and clicking on [2] results in an error statement.</p>
<p>However, if I modify the statement to <code>for($i=0; $i&lt; count($pages); $i++):</code> it brings up pages [0] and [1].  Clicking on [0] shows the first 5 files and clicking on [1] shows the next 2 files out of the seven.</p>
<p>The later works very nicely.</p>
<p>What may I be doing wrong!?!</p>
<p>Thanks,<br />
Al</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffanybbrown</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91477</link>
		<dc:creator>tiffanybbrown</dc:creator>
		<pubDate>Fri, 05 Jun 2009 14:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91477</guid>
		<description>Which URL are you using? I have feeds at&lt;br /&gt;&lt;a href=&quot;http://tiffanybbrown.com/feed/&quot; target=&quot;_blank&quot;&gt;http://tiffanybbrown.com/feed/&lt;/a&gt; and &lt;a href=&quot;http://tiffanybbrown.com/feed/atom/&quot; target=&quot;_blank&quot;&gt;http://tiffanybbrown.com/feed/atom/&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>Which URL are you using? I have feeds at<br /><a href="http://tiffanybbrown.com/feed/" target="_blank">http://tiffanybbrown.com/feed/</a> and <a href="http://tiffanybbrown.com/feed/atom/" target="_blank">http://tiffanybbrown.com/feed/atom/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffanybbrown</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93381</link>
		<dc:creator>tiffanybbrown</dc:creator>
		<pubDate>Fri, 05 Jun 2009 14:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93381</guid>
		<description>Which URL are you using? I have feeds at&lt;a href=&quot;http://tiffanybbrown.com/feed/&quot; rel=&quot;nofollow&quot;&gt;http://tiffanybbrown.com/feed/&lt;/a&gt; and &lt;a href=&quot;http://tiffanybbrown.com/feed/atom/&quot; rel=&quot;nofollow&quot;&gt;http://tiffanybbrown.com/feed/atom/&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>Which URL are you using? I have feeds at<a href="http://tiffanybbrown.com/feed/" rel="nofollow">http://tiffanybbrown.com/feed/</a> and <a href="http://tiffanybbrown.com/feed/atom/" rel="nofollow">http://tiffanybbrown.com/feed/atom/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie P.</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-91472</link>
		<dc:creator>Leslie P.</dc:creator>
		<pubDate>Fri, 05 Jun 2009 01:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-91472</guid>
		<description>I&#039;ve been having problems subscribing to this feed.  It lets me subscribe and it loads in the rss reader program I use (which is netnewswire for mac) but it&#039;s not showing new posts.  A few duplicates too.  Am I using the wrong url perhaps?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been having problems subscribing to this feed.  It lets me subscribe and it loads in the rss reader program I use (which is netnewswire for mac) but it&#8217;s not showing new posts.  A few duplicates too.  Am I using the wrong url perhaps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie P.</title>
		<link>http://tiffanybbrown.com/2008/12/14/simple-pagination-for-arrays-with-php-5/comment-page-1/#comment-93380</link>
		<dc:creator>Leslie P.</dc:creator>
		<pubDate>Fri, 05 Jun 2009 01:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1646#comment-93380</guid>
		<description>I&#039;ve been having problems subscribing to this feed.  It lets me subscribe and it loads in the rss reader program I use (which is netnewswire for mac) but it&#039;s not showing new posts.  A few duplicates too.  Am I using the wrong url perhaps?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been having problems subscribing to this feed.  It lets me subscribe and it loads in the rss reader program I use (which is netnewswire for mac) but it&#8217;s not showing new posts.  A few duplicates too.  Am I using the wrong url perhaps?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

