Why is assigning a PHP variable printing a value out on the screen?
<p>This has me completely baffled, I'm doing the following:</p>

<pre><code>if($tasks = someFunction(1))
{


}
</code></pre>

<p>someFunction() returns an array of records from a database. For some reason, assigning this array to $tasks causes a number to be printed out to the screen. The number it prints is the number of records that it has returned, but at no point do I ever echo this variable.</p>

<p>To confirm, I added the following code:</p>

<pre><code>$tasks = someFunction(1);
$tasks = someFunction(1);
$tasks = someFunction(1);
</code></pre>

<p>Above the if statement, and sure enough I was greeted by "4444" on my screen (It was returning 4 records). I've implemented code that's basically identical elsewhere in my code and have never run into this, I'm confused as to how a variable assignment can cause a value to display on the screen.</p>
