<?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: Zebra Tables: How to alternate table row colors</title>
	<atom:link href="http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/feed/" rel="self" type="application/rss+xml" />
	<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/</link>
	<description>My daily struggle with webdevelopment</description>
	<lastBuildDate>Fri, 26 Feb 2010 08:33:10 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andreas</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1307</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Thu, 19 Nov 2009 21:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1307</guid>
		<description>Hi Mark, 
great you figured it out for yourself and sorry for the late reply. :)</description>
		<content:encoded><![CDATA[<p>Hi Mark,<br />
great you figured it out for yourself and sorry for the late reply. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1306</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 19 Nov 2009 19:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1306</guid>
		<description>I made it work, thanks anyway!</description>
		<content:encoded><![CDATA[<p>I made it work, thanks anyway!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1305</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 19 Nov 2009 02:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1305</guid>
		<description>Hello,

Thank you for your great explanation! I do understand most of it, but can&#039;t seem to get it to work in my case.

I&#039;m importing a CSV file, and that adds difficulty.

This is my code;

&lt;?php
print(&quot;\n&quot;);
$row = 0;
$handle = fopen(&quot;test_portfolio.csv&quot;, &quot;r&quot;);
while (($data = fgetcsv($handle, 1000, &quot;,&quot;)) !== FALSE) {
   $num = count($data);
   for ($c=0; $c &lt;= $row; $c++)
{
    print(&quot;&quot;);
    print(&quot;&quot;.$data[0].&quot; &quot;);
	print(&quot;&quot;.$data[1].&quot; &quot;);
	print(&quot;&quot;.$data[2].&quot; &quot;);
	print(&quot;&quot;.$data[3].&quot; &quot;);
	print(&quot;&quot;.$data[4].&quot; &quot;);
	print(&quot;&quot;.$data[5].&quot; &quot;);
	print(&quot;&quot;.$data[6].&quot; &quot;);
	print(&quot;&quot;.$data[7].&quot; &quot;);
    print(&quot;&quot;);
}
}
fclose($handle);
?&gt;

Do you have any idea how to achieve this zebra pattern with this? Thanks so much!

Mark</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thank you for your great explanation! I do understand most of it, but can&#8217;t seem to get it to work in my case.</p>
<p>I&#8217;m importing a CSV file, and that adds difficulty.</p>
<p>This is my code;</p>
<p>&lt;?php<br />
print(&quot;\n&#8221;);<br />
$row = 0;<br />
$handle = fopen(&#8220;test_portfolio.csv&#8221;, &#8220;r&#8221;);<br />
while (($data = fgetcsv($handle, 1000, &#8220;,&#8221;)) !== FALSE) {<br />
   $num = count($data);<br />
   for ($c=0; $c &lt;= $row; $c++)<br />
{<br />
    print(&quot;&#8221;);<br />
    print(&#8220;&#8221;.$data[0].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[1].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[2].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[3].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[4].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[5].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[6].&#8221; &#8220;);<br />
	print(&#8220;&#8221;.$data[7].&#8221; &#8220;);<br />
    print(&#8220;&#8221;);<br />
}<br />
}<br />
fclose($handle);<br />
?&gt;</p>
<p>Do you have any idea how to achieve this zebra pattern with this? Thanks so much!</p>
<p>Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1304</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Sun, 08 Nov 2009 01:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1304</guid>
		<description>Hi jayaprakash,
if you already use cakePHPs tableCells-Helper you can use the oddTrOptions and evenTrOptions. 
It&#039;s explained here:
http://book.cakephp.org/view/841/tableCells</description>
		<content:encoded><![CDATA[<p>Hi jayaprakash,<br />
if you already use cakePHPs tableCells-Helper you can use the oddTrOptions and evenTrOptions.<br />
It&#8217;s explained here:<br />
<a href="http://book.cakephp.org/view/841/tableCells" rel="nofollow">http://book.cakephp.org/view/841/tableCells</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayaprakash</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1303</link>
		<dc:creator>jayaprakash</dc:creator>
		<pubDate>Fri, 06 Nov 2009 11:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1303</guid>
		<description>sir,

please let me know how to combine your logic with the tablecells function of cake php.

the present code is

tableHeaders(
			array(&#039;Code&#039;, &#039;Unit&#039;, &#039;IP Address&#039;, &#039;Email&#039;,)
	 );

	foreach($units as $unit)	{



    $class = next($classes) or reset($classes); 
			 echo $html-&gt;tableCells(
        array(
          $unit[&#039;Unit&#039;][&#039;code&#039;],
          $unit[&#039;Unit&#039;][&#039;name&#039;],
          $unit[&#039;Unit&#039;][&#039;ip&#039;],
          $unit[&#039;Unit&#039;][&#039;email&#039;]
      
      )
    );</description>
		<content:encoded><![CDATA[<p>sir,</p>
<p>please let me know how to combine your logic with the tablecells function of cake php.</p>
<p>the present code is</p>
<p>tableHeaders(<br />
			array(&#8216;Code&#8217;, &#8216;Unit&#8217;, &#8216;IP Address&#8217;, &#8216;Email&#8217;,)<br />
	 );</p>
<p>	foreach($units as $unit)	{</p>
<p>    $class = next($classes) or reset($classes);<br />
			 echo $html-&gt;tableCells(<br />
        array(<br />
          $unit['Unit']['code'],<br />
          $unit['Unit']['name'],<br />
          $unit['Unit']['ip'],<br />
          $unit['Unit']['email']</p>
<p>      )<br />
    );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1298</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Mon, 03 Aug 2009 22:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1298</guid>
		<description>Thanks a lot, for your perfect explanation of how to create this effect! I ended up doing another solution though, 

while($row = mysql_fetch_array($resultat))
  {
  ?&gt; &lt;tr class=&quot;row_&quot;&gt;
  &lt;?php
... ...  ...  ...
  $i++;
  }

worked good in my situation I guess. Thanks again!</description>
		<content:encoded><![CDATA[<p>Thanks a lot, for your perfect explanation of how to create this effect! I ended up doing another solution though, </p>
<p>while($row = mysql_fetch_array($resultat))<br />
  {<br />
  ?&gt; &lt;tr class=&quot;row_&#8221;&gt;<br />
  &lt;?php<br />
&#8230; &#8230;  &#8230;  &#8230;<br />
  $i++;<br />
  }</p>
<p>worked good in my situation I guess. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakePHP cycle-helper: alternating row colors with cake &#171; Functino</title>
		<link>http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/comment-page-1/#comment-1294</link>
		<dc:creator>cakePHP cycle-helper: alternating row colors with cake &#171; Functino</dc:creator>
		<pubDate>Sat, 18 Jul 2009 15:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://functino.com/?p=103#comment-1294</guid>
		<description>[...] It&#8217;s been a long time since my last posting. Today I&#8217;m going to show you my cycle-helper for cakePHP. If you haven&#8217;t read my other posts on alternating row colors, do so now: Alternate Table Rows in CakePHP (and ZF, Rails, Smarty) and http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/ [...]</description>
		<content:encoded><![CDATA[<p>[...] It&#8217;s been a long time since my last posting. Today I&#8217;m going to show you my cycle-helper for cakePHP. If you haven&#8217;t read my other posts on alternating row colors, do so now: Alternate Table Rows in CakePHP (and ZF, Rails, Smarty) and <a href="http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/" rel="nofollow">http://functino.com/2009/04/zebra-tables-how-to-alternate-table-row-colors/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
