<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1023661" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1023661</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145373</link>
    <description> &lt;p&gt;Hm, true, druagord. Guess I have to revisit my math. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt; I&#039;ve used modulus in ASP to create evenly distributed results in three columns, similar to pagination. Very handy. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 07 Feb 2004 10:50:36 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1145373 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145352</link>
    <description> &lt;p&gt;Another use of modulus i came across a few time is when displaying result in multiple pages. Let say i have 25 results per pages i do a query that comes up with 134 results i do&lt;br /&gt;
number of pages = ceil(134/25) = 6&lt;br /&gt;
number of result on the last page = 134%25 = 9&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 14:40:45 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1145352 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145350</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;druagord wrote:&lt;/strong&gt; 15%10 would be 5&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://www.google.com/search?q=15%2510&quot; class=&quot;bb-url&quot;&gt;http://www.google.com/search?q=15%2510&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Google is so handy! Don&#039;t mind me while I walk through this for my own edification:&lt;/p&gt;
&lt;p&gt;10 gahzinta* 15 once, remainder 5&lt;br /&gt;
2 gahzinta 3 once, remainder 1&lt;br /&gt;
8 gahzinta 16 twice, remainder 0&lt;br /&gt;
2 gahzinta $anyevennumber exactly, remainder 0&lt;/p&gt;
&lt;p&gt;So if it&#039;s even, it returns 0, no matter what.&lt;/p&gt;
&lt;p&gt;Excellent.&lt;/p&gt;
&lt;p&gt;Now, how you do you set it up? Oh, of course, since two goes into any even number perfectly, you&#039;ll always get a remainder of zero for %2 if the number is even.&lt;/p&gt;
&lt;p&gt;Nifty!&lt;/p&gt;
&lt;p&gt;These are all zero:&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/search?q=36895825420%252&quot; class=&quot;bb-url&quot;&gt;http://www.google.com/search?q=36895825420%252&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/search?q=2%252&quot; class=&quot;bb-url&quot;&gt;http://www.google.com/search?q=2%252&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/search?q=18%252&quot; class=&quot;bb-url&quot;&gt;http://www.google.com/search?q=18%252&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;*gahzinta = &quot;goes into&quot; slang slang slang&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 14:29:46 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1145350 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145349</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;Abhishek Reddy wrote:&lt;/strong&gt; Suzanne, modulus is the standard way of colouring tables, afaik. What have you been using, then? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I don&#039;t colour table rows, as a habit. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; I haven&#039;t done anything (yet) that would require it (in php).&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 14:19:02 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1145349 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145348</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote:&lt;br /&gt;
2) your result would be 0.5
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;no 3/2 would give 1 reminder 1  so 3%2 would give 1 as a result.  there are no decimals with modolus only integers. Try to remember the first division you made in school before you learned about decimals&lt;br /&gt;
15%10 would be 5&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 14:15:57 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1145348 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145335</link>
    <description> &lt;p&gt;&quot;modulus&quot; means &quot;remainder of&quot;. If you have &lt;strong&gt;4%2 &lt;/strong&gt;or&lt;strong&gt; mod (4, 2)&lt;/strong&gt; your result will be 0. That is, 4 divided by 2 is 2, with 0 remaining. Whereas if you had &lt;strong&gt;3%2&lt;/strong&gt; or &lt;strong&gt;mod (3, 2)&lt;/strong&gt; your result would be 0.5, since 3 divided by 2 is 1 plus a remainder of 0.5. So you can test for even numbers by looking for a returned value of 0 after using %2. Anything else should be odd. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;   Suzanne, modulus is the standard way of colouring tables, afaik. What have you been using, then? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 00:50:19 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1145335 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145334</link>
    <description> &lt;p&gt;I checked php.net for modulus, but it didn&#039;t help define it.  What exactly is &quot;modulus&quot;?&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Feb 2004 00:40:45 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1145334 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145324</link>
    <description> &lt;p&gt;No shame in being eager, heh. I thought to myself when you wrote that, well, hmmm, maybe I should post the whole function instead of just linking to it. Always thinking of the lurkers, that&#039;s me! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Feb 2004 18:01:43 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1145324 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145323</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote:&lt;br /&gt;
That&#039;s what this guy has built his function around. I haven&#039;t had the need, but now that I know how, I&#039;m thinking this would be interesting for colouring table rows?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;it can be usefull for all kind of thing but your right thats how i use this most of the time. Sorry i didn&#039;t follow the link you put guess i was to eager to answer &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Feb 2004 17:59:13 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1145323 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-font-color#comment-1145322</link>
    <description> &lt;p&gt;That&#039;s what this guy has built his function around. I haven&#039;t had the need, but now that I know how, I&#039;m thinking this would be interesting for colouring table rows?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// function: Check if a value ($value) is even or odd.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;even&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;is_int&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Per definition only integers can be odd/even&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if ((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;% &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) == &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) {&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Divide by 2 and if modulus is 0 we are even&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Number is even&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Number is odd&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Number is not an integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;from: &lt;a href=&quot;http://www.linux.org.za/Lists-Archives/dev-0303/msg00019.html&quot; class=&quot;bb-url&quot;&gt;Carl Swart&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Feb 2004 17:53:57 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1145322 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
