<?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>boolean.co.nz</title>
	<atom:link href="http://boolean.co.nz/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://boolean.co.nz/blog</link>
	<description>Where there is more to logic than TRUE or FALSE</description>
	<lastBuildDate>Sun, 29 Jan 2012 03:16:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Obtain Facebook likes via PHP SDK</title>
		<link>http://boolean.co.nz/blog/facebook-likes-sdk/713/</link>
		<comments>http://boolean.co.nz/blog/facebook-likes-sdk/713/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 03:11:36 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[FaceBook]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=713</guid>
		<description><![CDATA[In an update to this post here is another way to obtain the number of likes for a Facebook page. I&#8217;ll assume that you&#8217;ve already registered a Facebook application, have downloaded the PHP SDK and have included for use in your code. require(&#8216;facebook.php&#8217;); Setup an array with your Facebook applications credentials $facebook = new Facebook(array( [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" /></td>
</tr>
</table>
<p>In an update to this <a href="http://boolean.co.nz/blog/get-facebook-likes-and-shares-via-graph-api/626/" title="post" target="_blank">post</a> here is another way to obtain the number of likes for a Facebook page.</p>
<p>I&#8217;ll assume that you&#8217;ve already registered a Facebook application, have downloaded the PHP SDK and have included for use in your code.</p>
<div class="codesnip-container" >require(&#8216;facebook.php&#8217;);</div>
<p>Setup an array with your Facebook applications credentials</p>
<div class="codesnip-container" >$facebook = new Facebook(array(<br />
&#8216;appId&#8217; => &#8217;000000000&#8242;, // Put appID here<br />
&#8216;secret&#8217; => &#8217;0000c000c000c000c&#8217;, // Put your secret key here<br />
));</div>
<p>Decide which page you wish to obtain the number of likes for</p>
<div class="codesnip-container" >$getRequest = $facebook->api(&#8216;/cocacola&#8217;); // Lets look at the Facebook page for the popular soft drink<br />
echo $getRequests['likes'];</div>
<p>Obviously you can consume, contrast and display this information in more exciting ways than simply echoing it to the screen. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/facebook-likes-sdk/713/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX Lion 10.7.2 Tweetdeck Crashes</title>
		<link>http://boolean.co.nz/blog/osx-tweetdeck-crashes/704/</link>
		<comments>http://boolean.co.nz/blog/osx-tweetdeck-crashes/704/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 00:24:52 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=704</guid>
		<description><![CDATA[Tweetdeck has been crashing on startup recently, &#8211; seemingly without any kind of pattern. At first I attributed this to OSX Lion related issues, but sometimes having Firefox or Chrome open seemed to solve the problem. I have finally tracked down the underlying issue to Adobe Air, the framework powering Tweetdeck and many other applications. [...]]]></description>
			<content:encoded><![CDATA[<p>Tweetdeck has been crashing on startup recently, &#8211; seemingly without any kind of pattern. At first I attributed this to OSX Lion related issues, but sometimes having Firefox or Chrome open seemed to solve the problem.</p>
<p>I have finally tracked down the underlying issue to Adobe Air, the framework powering Tweetdeck and many other applications. In fact it is the switching software for late model Macbook Pros toggling between the discrete and integrated graphics cards. Launching Firefox or Chrome forces the graphics card to switch to discrete mode, solving the autoswitching and crashing on startup error.</p>
<p>You can manually change the setting to solve the problem by navigating to System Preferences -> Energy Saver. Uncheck the Automatic Graphics Switching at the top of the preferences dialog.</p>
<p>A better fix however is to use <a href="http://codykrieger.com/gfxCardStatus" title="gfxCardStatus" target="_blank">gfxCardStatus</a> which is a menu bar application for OSX that allows users of dual-GPU 15&#8243; and 17&#8243; MacBook Pros to view which GPU is in use at a glance, and switch between them on-demand.</p>
<p><strong>Update 29/01/2012</strong><br />
I have discovered that VMWareFusion does not play nicely at all with gfxCardStatus. Fusion <em>will</em> work if you disable dynamic switching and force the use of the discrete GPU but if you change between the two, expect major issues. I&#8217;m disabling gfxCardStatus before launching Fusion to avoid the problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/osx-tweetdeck-crashes/704/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding copyright meta data to WordPress</title>
		<link>http://boolean.co.nz/blog/adding-copyright-meta-data-to-wordpress/692/</link>
		<comments>http://boolean.co.nz/blog/adding-copyright-meta-data-to-wordpress/692/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 01:36:25 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=692</guid>
		<description><![CDATA[This simple example illustrates how easy it is to automatically have copyright information displayed in a sites meta tags. Simply place the following snippet in your functions.php file (remembering of course to substitute your own copyright details add_action(&#8220;wp_head&#8221;, &#8220;add_copyright_meta&#8221;); function add_copyright_meta() { if(is_singular()){ echo &#8220;&#60;meta name=&#8221;copyright&#8221; content=&#8221;Company Details, Year&#8221;&#62;&#8221;; } }]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/04/wordpress_logo.png" alt="Wordpress Logo" title="wordpress_logo" width="360" height="82" class="aligncenter size-full wp-image-91" /></td>
</tr>
</table>
<p>This simple example illustrates how easy it is to automatically have copyright information displayed in a sites meta tags. Simply place the following snippet in your functions.php file (remembering of course to substitute your own copyright details</p>
<div class="codesnip-container" >add_action(&#8220;wp_head&#8221;, &#8220;add_copyright_meta&#8221;);</p>
<p>function add_copyright_meta() {<br />
   if(is_singular()){<br />
      echo &#8220;&lt;meta name=&#8221;copyright&#8221; content=&#8221;Company Details, Year&#8221;&gt;&#8221;;<br />
   }<br />
}</p></div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/adding-copyright-meta-data-to-wordpress/692/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force trailing slash with .htaccess</title>
		<link>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/</link>
		<comments>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 23:22:18 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=684</guid>
		<description><![CDATA[There are a few reasons to force a trailing slash at the end of URLs including SEO A quick snippet for your .htaccess is below: &#60;IfModule mod_rewrite.c&#62; RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] &#60;/IfModule&#62; And while I&#8217;m here a quick snippet to prevent hotlinking of images. This will redirect all requests to a specified [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2011/09/apache_logo.png" alt="" title="apache_logo" width="365" height="57" class="aligncenter size-full wp-image-635" /></td>
</tr>
</table>
<p>There are a few reasons to force a trailing slash at the end of URLs including SEO</p>
<p>A quick snippet for your .htaccess is below:</p>
<div class="codesnip-container" >&lt;IfModule mod_rewrite.c&gt;<br />
 RewriteCond %{REQUEST_URI} /+[^\.]+$<br />
 RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]<br />
&lt;/IfModule&gt;</div>
<p>And while I&#8217;m here a quick snippet to prevent hotlinking of images. This will redirect all requests to a specified image, simply replace yoursite.com with your own URL, and nohotlinking.jpg with your own image and path.</p>
<div class="codesnip-container" >RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yoursite\.com/ [NC]<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlinking.jpg [L]</div>
<p>And finally a snippet to put in your image assets folder (you have images stored separately right?) to prevent malicious code execution and prevent directory listing of all your assets.</p>
<div class="codesnip-container" >Options All -Indexes<br />
AddHandler cgi-script .php .php4 .php5 .pl .jsp .asp .sh .cgi<br />
Options -ExecCGI</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox cross domain font embedding</title>
		<link>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/</link>
		<comments>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 23:24:59 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=676</guid>
		<description><![CDATA[Firefox has a limitation for cross domain font embedding in that it does not allow you to embed from another website. This .htaccess snippet allows you to bypass this limitation and embed fonts located on another webserver. &#60;FilesMatch &#8220;\.(ttf&#124;otf&#124;eot&#124;woff)$&#8221;&#62; &#60;IfModule mod_headers.c&#62; Header set Access-Control-Allow-Origin &#8220;http://thedomain.com&#8221; &#60;/IfModule&#62; &#60;/FilesMatch&#62;]]></description>
			<content:encoded><![CDATA[<p>Firefox has a limitation for cross domain font embedding in that it does not allow you to embed from another website. This .htaccess snippet allows you to bypass this limitation and embed fonts located on another webserver.</p>
<div class="codesnip-container" >&lt;FilesMatch &#8220;\.(ttf|otf|eot|woff)$&#8221;&gt;<br />
&lt;IfModule mod_headers.c&gt;<br />
    Header set Access-Control-Allow-Origin &#8220;http://thedomain.com&#8221;<br />
&lt;/IfModule&gt;<br />
&lt;/FilesMatch&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use PHP to display Gravatar images</title>
		<link>http://boolean.co.nz/blog/use-php-to-display-gravatar-images/668/</link>
		<comments>http://boolean.co.nz/blog/use-php-to-display-gravatar-images/668/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 03:34:25 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=668</guid>
		<description><![CDATA[All URLs on Gravatar are based on the use of the hashed value of an email address. According to their best practice you should: Trim leading and trailing whitespace from an email address Force all characters to lower-case md5 hash the final string Of course in PHP this is trivial as the following function shows: [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" /></td>
</tr>
</table>
<p>All URLs on <a href="http://en.gravatar.com/site/implement/hash/" target="_blank">Gravatar</a> are based on the use of the hashed value of an email address. According to their best practice you should:</p>
<ol>
<li>Trim leading and trailing whitespace from an email address</li>
<li>Force all characters to lower-case</li>
<li>md5 hash the final string</li>
</ol>
<p>Of course in PHP this is trivial as the following function shows:</p>
<div class="codesnip-container" >function fetchGravatar() {<br />
$fetchHash = md5(strtolower(trim(&#8216;your_email.address.com&#8217;)));<br />
$GravatarImage = &#8216;http://www.gravatar.com/avatar/&#8217; . $fetchHash;<br />
return $GravatarImage;<br />
}</div>
<p><a href="http://en.gravatar.com/site/implement/profiles/" target="_blank">Profiles</a> are also available if you require them.</p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/use-php-to-display-gravatar-images/668/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSV to .plist conversion</title>
		<link>http://boolean.co.nz/blog/csv-to-plist-conversion/665/</link>
		<comments>http://boolean.co.nz/blog/csv-to-plist-conversion/665/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 08:26:12 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=665</guid>
		<description><![CDATA[Property list files (.pfiles) store serialized objects and are often used to store a user&#8217;s settings. They are also used to store information about bundles and applications in OSX and recently iOS. Danilo Campos wrote some time ago some background information and provided his source and blogged about the subject. Better than that however, he [...]]]></description>
			<content:encoded><![CDATA[<p>Property list files (.pfiles) store serialized objects and are often used to store a user&#8217;s settings. They are also used to store information about bundles and applications in OSX and recently iOS.</p>
<p><a href="http://blog.danilocampos.com/" title="Danilo Campos" target="_blank">Danilo Campos</a> wrote some time ago some background information and provided his <a href="http://code.google.com/p/danilobits/source/checkout" title="source" target="_blank">source</a> and <a href="http://blog.danilocampos.com/2009/12/04/convert-a-csv-into-a-plist-file/" title="blogged" target="_blank">blogged</a> about the subject. Better than that however, he provided an OSX binary to <a href="http://danilobits.googlecode.com/files/Plist%20Converter1.0.zip" title="download" target="_blank">download</a> if you want to get going straight away.</p>
<p>This little application makes it easy to format and process your source data in a familiar environment like Excel and then convert ready to use in your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/csv-to-plist-conversion/665/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Host Settings Without phpinfo()</title>
		<link>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/</link>
		<comments>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 09:36:05 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=652</guid>
		<description><![CDATA[Occasionally a webhost will block the very useful phpinfo() command making it difficult to understand any limitations of the server configuration. This script can display relevant information to help you understand what is happening behind the scenes. &#60;?php $d_func = ini_get(&#8220;disable_functions&#8221;); $up_max = ini_get(&#8220;upload_max_filesize&#8221;); $up_max = str_replace(&#8220;M&#8221;,&#8221;",$up_max); $up_max_size = &#8220;Megabytes&#8221;; $post_max = ini_get(&#8220;post_max_size&#8221;); $post_max = [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" />
<td>
<tr></table>
<p>Occasionally a webhost will block the very useful phpinfo() command making it difficult to understand any limitations of the server configuration. This script can display relevant information to help you understand what is happening behind the scenes.</p>
<div class="codesnip-container" >&lt;?php<br />
        $d_func = ini_get(&#8220;disable_functions&#8221;);<br />
        $up_max =  ini_get(&#8220;upload_max_filesize&#8221;);<br />
        $up_max = str_replace(&#8220;M&#8221;,&#8221;",$up_max);<br />
        $up_max_size = &#8220;Megabytes&#8221;;<br />
        $post_max = ini_get(&#8220;post_max_size&#8221;);<br />
        $post_max = str_replace(&#8220;M&#8221;,&#8221;",$post_max);<br />
        $post_max_size = &#8220;Megabytes&#8221;;<br />
        $input_max = ini_get(&#8220;max_input_time&#8221;);<br />
        $mem_limit = ini_get(&#8220;memory_limit&#8221;);<br />
        $mem_limit = str_replace(&#8220;M&#8221;,&#8221;",$mem_limit);<br />
        $mem_limit_size = &#8220;Megabytes&#8221;;<br />
        $exec_time = ini_get(&#8220;max_execution_time&#8221;);<br />
        $safe_mode = ini_get(&#8220;safe_mode&#8221;);</p>
<p>        if(!is_null($d_func) &#038;&#038; $d_func !== &#8220;&#8221;){echo  &#8220;Disabled Functions: \n $d_func&#8221;;}<br />
        if(!is_null($safe_mode) &#038;&#038; $safe_mode !== &#8220;&#8221;){echo  &#8220;&lt;span style=&#8217;color:red;&#8217;&gt;Safe Mode is Active&lt;/span&gt; &lt;br&gt;&#8221;;}<br />
        if($up_max >= 1001){$up_max = $up_max / 1024; $up_max_size = &#8220;Gigabytes&#8221;;<br />
        if($up_max >= 10001){$up_max = $up_max / 1024; $up_max_size = &#8220;Terabytes&#8221;;}}<br />
        if($post_max >= 1001){$post_max = $post_max / 1024; $post_max_size = &#8220;Gigabytes&#8221;;<br />
        if($post_max >= 10001){$post_max = $post_max / 1024;$post_max_size = &#8220;Terabytes&#8221;;}}<br />
        if (min($input_max,60)){$input_max = $input_max /60;}<br />
        if (min($exec_time,60)){$exec_time = $exec_time /60;}<br />
        if($mem_limit >= 1001){$mem_limit = $mem_limit / 1024; $mem_limit_size = &#8220;Gigabytes&#8221;;}</p>
<p>        echo &#8220;Maximum Upload Size = $up_max $up_max_size&lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Post Size = $post_max $post_max_size &lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Input Time = $input_max minute/s&lt;br&gt;&#8221;;<br />
        echo &#8220;Memory Limit = $mem_limit $mem_limit_size&lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Execution Time = $exec_time minute/s&lt;br&gt;&#8221;;<br />
?&gt;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disappearing Folders in OSX Lion</title>
		<link>http://boolean.co.nz/blog/disappearing-folders-osx-lio/661/</link>
		<comments>http://boolean.co.nz/blog/disappearing-folders-osx-lio/661/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 23:23:46 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=661</guid>
		<description><![CDATA[After installing Mac OS X 10.7 Lion I noticed folders were missing. For me the main issue was that the Library folder in my user account seemed to have vanished. As this folder holds nearly all the data that applications save without asking such as mail, preferences, calendars and virtual disks it was important to [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Mac OS X 10.7 Lion I noticed folders were missing. For me the main issue was that the Library folder in my user account seemed to have vanished. As this folder holds nearly all the data that applications save without asking such as mail, preferences, calendars and virtual disks it was important to have an easy way to manage it, especially as I wanted to exclude the Steam folder located there in Time Machine.</p>
<p>Simply launch Terminal from your applications/utilities folder and type</p>
<div class="codesnip-container" >chflags nohidden ~/Library</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/disappearing-folders-osx-lio/661/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Modulo Operator For Alternating Rows</title>
		<link>http://boolean.co.nz/blog/modulo-alternating-rows/647/</link>
		<comments>http://boolean.co.nz/blog/modulo-alternating-rows/647/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 22:24:50 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=647</guid>
		<description><![CDATA[Alternating row colours within a grid of data can make for a more pleasant viewing experience and has become a popular styling method in recent times. I was a little incredulous at some code I saw recently to determine alternating rows so without further introduction, meet the Modulo operator which is a quick and easy [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
<img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" /></td>
</tr>
</table>
<p>Alternating row colours within a grid of data can make for a more pleasant viewing experience and has become a popular styling method in recent times. I was a little incredulous at some code I saw recently to determine alternating rows so without further introduction, meet the Modulo operator which is a quick and easy way to get up and running:</p>
<div class="codesnip-container" >for($i=0;$i<10;$i++){<br />
  if($i % 2){<br />
   // This is an even row<br />
  }else{<br />
   // This is an odd row<br />
  }<br />
}</div>
<p>I&#8217;m sure you will be able to apply this to your own css or styling within your loops.</p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/modulo-alternating-rows/647/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

