PHP Multiple condition if statement returning nothing
<p>I have been trying to figure this out for weeks, it is a simple statement yet it never executes the if statement. I'm echoing the variables to the screen so I know they exist and each condition is true, but the echo "something" never executes.</p>

<pre><code> if ($db_a==$session_a &amp;&amp; $db_b==$session_b &amp;&amp; $dbfreq_b=="1")

        {
         echo "something";
        }
</code></pre>

<p>I thought it was just the brackets as I had this originally:</p>

<pre><code>if (($db_a==$session_a) &amp;&amp; ($db_b==$session_b) &amp;&amp; ($dbfreq_b=="1")) 
</code></pre>

<p>I am comparing variables stored in a MYSQL database with session variables. </p>

<p>If I use Var_dump the db variables are null, yet they echo the expected string value to the screen. </p>

<pre><code>$db_a="username";
$session_a="username";
$db_b=="keyword string"; -mostly one word but could be multiple
$session_b=="keyword string";
$dbfreq_b="1"; - This is the frequency that the keyword appears in the MYSQL database
</code></pre>

<p>using vardump $db_a and $db_b are NULL yet they echo what I am expecting to see to the browser.</p>

<p>Hopefully this explains things a bit more?</p>

<p>Thank you for the very prompt help!!</p>
