<?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>Sat, 18 May 2013 22:23:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[WebReference.com: How To Create Alternating Row Colors in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8086</guid>
      <link>http://www.phpdeveloper.org/news/8086</link>
      <description><![CDATA[<p>
WebReference.com has a <a href="http://www.webreference.com/programming/php_color/">simple new tutorial</a> today showing how to create alternating table rows in the output for your application.
</p>
<blockquote>
Almost every database driven Web site uses alternating row colors when displaying a list of records, a concept used all over the Internet.  You've seen it used, you like it, and now you want to do it yourself.  But you're not sure how to accomplish it.  Well you've come to the right place.  I'm going to discuss the basic idea behind achieving this and give some concrete examples demonstrating different ways to implement it.
</blockquote>
<p>
Their script loops through the information (numbers in their case) and checks, using the modulus operator to check and see which of the CSS styles it should apply to the div. To give a range of possibility, they also show how to do it with a while loop instead of a for to do a little benchmarking of the methods.
</p>]]></description>
      <pubDate>Wed, 20 Jun 2007 11:12:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebDevLogs.com:  BREAK the FOR VS WHILE loop war]]></title>
      <guid>http://www.phpdeveloper.org/news/7514</guid>
      <link>http://www.phpdeveloper.org/news/7514</link>
      <description><![CDATA[<p>
In <a href="http://www.webdevlogs.com/2007/03/26/break-the-for-vs-while-loop-war/">this new post</a> on Mgccl's blog today, there's a response to <a href="http://www.phpdeveloper.org/news/7505">these benchmarks</a> from <i>John Walsh</i> concerning which is faster - a for loop or a while loop.
</p>
<p>
In this new post, <i>Mgccl</i>, he points out <a href="http://www.bruesoft.com/php_benchmark.php#loopforwhile">two</a> <a href="http://cosminb.blogspot.com/2004/09/performance-tweaking-for-vs-while-vs.html">other</a> examples that show that a while loop is always faster than a for loop. To help prove the point, he's also included a screencast where he shows the code he's using to run the benchmarks (several different tests).
</p>
<p>
His results, matching the results from the other reports, not only shows that the while loop is faster (still only slightly), but also consumes less memory in the process.
</p>]]></description>
      <pubDate>Tue, 27 Mar 2007 11:37:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[John Walsh's Blog: PHP Benchmark - For vs While]]></title>
      <guid>http://www.phpdeveloper.org/news/7505</guid>
      <link>http://www.phpdeveloper.org/news/7505</link>
      <description><![CDATA[<p>
<i>John Walsh</i> filled us in on a <a href="http://www.myphpdigest.com/tutorial/PHP%20Benchmark%20-%20For%20vs%20While">new set of benchmarks</a> he worked up comparing two of the standard looping structures in PHP - for versus while.
</p>
<blockquote>
People always ask me what statement is faster, so I've gone ahead and created a benchmark test using <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">Apache's AB Benchmarking tool</a>. There's no reason not to use For either, you can use it with any while statement but While in some cases mean's less lines, but i prefer speed than less lines of code. 
</blockquote>
<p>
He <a href="http://www.myphpdigest.com/tutorial/PHP%20Benchmark%20-%20For%20vs%20While">created some simple scripts</a> to perform the tests and ran them through the AB benchmarker to come up with his results - with while just barely edging out the for loop by one millisecond.
</p>]]></description>
      <pubDate>Mon, 26 Mar 2007 15:19:23 -0500</pubDate>
    </item>
  </channel>
</rss>
