<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IKnowFooBar &#187; filter</title>
	<atom:link href="http://www.iknowfoobar.co.uk/tag/filter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iknowfoobar.co.uk</link>
	<description>A developer's [mis] take?</description>
	<lastBuildDate>Wed, 23 Jun 2010 11:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<cloud domain='www.iknowfoobar.co.uk' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Pesky Directory Alphabet Filters Made Easy (PHP)</title>
		<link>http://www.iknowfoobar.co.uk/2009/10/13/pesky-directory-alphabet-filters-made-easy/</link>
		<comments>http://www.iknowfoobar.co.uk/2009/10/13/pesky-directory-alphabet-filters-made-easy/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 09:37:15 +0000</pubDate>
		<dc:creator>Giles Smith</dc:creator>
				<category><![CDATA[IT, Tech & Internet]]></category>
		<category><![CDATA[alphabet]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.projectroon.co.uk/?p=801</guid>
		<description><![CDATA[I have built quite a few directory systems in my years as a web developer and one thing that has always annoyed me is building letter filters to return results depending on the first letter of a title. Normally I would waste a lot of time actually typing out the entire alphabet string: $alphabet = [...]]]></description>
			<content:encoded><![CDATA[<p>I have built quite a few directory systems in my years as a web developer and one thing that has always annoyed me is building letter filters to return results depending on the first letter of a title.</p>
<p>Normally I would waste a lot of time actually typing out the entire alphabet string:</p>
<pre name="code" class="php">$alphabet = 'abcdefghijklmnopqrstuvwxyz';</pre>
<p>which can take a lot of time (Go on try it, I&#8217;ll bet no matter how fast you can type, typing out the alphabet quickly will be tricky!) then looping through the string like so:</p>
<pre name="code" class="php">for($i = 0; $i &lt; strlen($alphabet); $i++)
{
  echo substr($alphabet, $i, 1);
} </pre>
<p>However there are 2 other much simpler methods:</p>
<h3>Method 1 &#8211; Loop through the ASCII numbers</h3>
<pre name="code" class="php">for($i = 65; $i &lt;= 90; $i++)
{
  echo chr($i);
}</pre>
<p>or my new personal favourite using PHP&#8217;s <a title="PHP Manual range()" href="http://docs.php.net/manual/en/function.range.php" target="_blank">range()</a> function:</p>
<h3>Method 2 &#8211; Using range()</h3>
<pre name="code" class="php">foreach(range('A', 'Z') as $i)
{
  echo $i;
}</pre>
<p>Then all you have to do is add in any code to make sure you set the right CSS selectors and highlight which letter you are currently viewing and add the ability to filter by first letter to your list function.</p>
<p>Simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iknowfoobar.co.uk/2009/10/13/pesky-directory-alphabet-filters-made-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Internet Filtering, the sensible way</title>
		<link>http://www.iknowfoobar.co.uk/2007/11/02/internet-filtering-the-sensible-way/</link>
		<comments>http://www.iknowfoobar.co.uk/2007/11/02/internet-filtering-the-sensible-way/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 09:42:25 +0000</pubDate>
		<dc:creator>Giles Smith</dc:creator>
				<category><![CDATA[IT, Tech & Internet]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.pureroon.co.uk/2007/11/03/internet-filtering-the-sensible-way/</guid>
		<description><![CDATA[&#8220;Saw this in the San Clemente, Ca library. I was performing my magic show and took this poor pic on my Treo. The &#8216;unfiltered&#8217; side faces the reference desk so the librarians can monitor usage but they say it has reduced abuse and given adults uncensored access to the internet.&#8221; Amazing Dana noticed this]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 490px"><img title="Practicle Internet Filtering" src="http://www.pureroon.co.uk/wp-content/uploads/2007/11/unfilteredfilteredinternet.jpg" alt="Unfiltered Internet" width="480" height="384" /><p class="wp-caption-text">Practicle Internet Filtering</p></div>
<blockquote><p>&#8220;Saw this in the San Clemente, Ca library. I was performing my magic show and took this poor pic on my Treo. The &#8216;unfiltered&#8217; side faces the reference desk so the librarians can monitor usage but they say it has reduced abuse and given adults uncensored access to the internet.&#8221;</p></blockquote>
<p><a title="Amazing Dana" href="http://amazingdana.com/" target="_blank">Amazing Dana</a> noticed this</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iknowfoobar.co.uk/2007/11/02/internet-filtering-the-sensible-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
