PHP Help: if ($row['cDeviceRegistrationId'] > 0) { $a = 1;} echo $a;
<p>I'm trying to have a "1" printed if there is a value in cDeviceRegistrationId column in the database. Here is the code:</p>

<p>$result is an SQL query </p>

<pre><code>while($row = mysql_fetch_assoc($result))
  {
if ($row['cDeviceRegistrationId'] &gt; 0) {
$a = 1;
}

 echo "&lt;tr class='forum'&gt;";
 echo "&lt;td class='forum'&gt;" . $row['intUserID'] . "&lt;/td&gt;";
 echo "&lt;td class='forum'&gt;" . $row['cUsername'] . "&lt;/td&gt;";
 echo "&lt;td class='forum'&gt;" . $row['cEmail'] . "&lt;/td&gt;";
 echo "&lt;td class='forum'&gt;$a&lt;/td&gt;";
 echo "&lt;td class='forum'&gt;" . $row['uCreateDate'] . "&lt;/td&gt;";
 echo "&lt;/tr&gt;";
 }
</code></pre>
