Simple comparison in PHP if($var == 0) not working?
<p>I'm getting data from a MySQL database and trying to check if the column has data in it or not. Here's what one of the array elements looks like:</p>

<pre><code>[2] =&gt; Array 
(   
        [p_name] =&gt; This is text
)
</code></pre>

<p>Now I have the following statement:</p>

<pre><code>if($products[2]['p_name'] == 0)
      echo '$products[2][\'p_name\'] == 0';
</code></pre>

<p>The output is:</p>

<pre><code>"$products[2]['p_name'] == 0"
</code></pre>

<p>Now, is it just me, or is that not make any sense whatsoever? </p>
