<?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, 25 May 2013 14:22:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Evolt.org: Working With Fractions In CSS and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/7256</guid>
      <link>http://www.phpdeveloper.org/news/7256</link>
      <description><![CDATA[<p>
Evolt.org has an <a href="http://evolt.org/working-with-fractions-in-css-and-php">interesting new article</a> posted today about combining CSS and PHP to display fractions correctly on your pages.
</p>
<blockquote>
Most of us are uncomfortable with using fractions when writing programs. If we encounter a fraction, we will first convert it into a floating point number (with decimals) and proceed from there. Most programming languages would prefer to use 0.5 as opposed to 1/2 because the later might conflict with the syntax of the languages. In this article, I will discuss my attempt to work with fractions in one of the PHP projects that I have done.
</blockquote>
<p>
They <a href="http://evolt.org/working-with-fractions-in-css-and-php">start with the CSS</a> to handle the output before moving into the PHP code. The code given will take in a decimal number and do its best to match it up with a fraction string value out of an array. The result is the echoed out with sup and sub tags to create the correct effect.
</p>]]></description>
      <pubDate>Mon, 12 Feb 2007 09:03:00 -0600</pubDate>
    </item>
  </channel>
</rss>
