echo font green if field1 > field2?
<p>I've done some research and coding to be able to make this function: </p>

<pre><code> (if field1 &gt; field 2 echo font color=green else if field 2 &gt; field 1 echo fontcolor=green else echo font black
</code></pre>

<p>(the double green has its purpose)</p>

<pre><code>   $query = "SELECT *  FROM table WHERE CATEGORY='15' ";
$result = mysql_query($query); 

 If ($result [field1] &gt; $result [field2] )

 echo "    &lt;style font="green"/&gt;   This category is green &lt;/style&gt; "

else if ($result [field1] &gt; $result [field2] )


echo "    &lt;style font="green"/&gt;   This category is green &lt;/style&gt; "

else

echo "    &lt;style font="black"/&gt;   This category is black &lt;/style&gt; "
</code></pre>

<p>Is this how its done? Are there any errors? </p>
