PHP: Why is date made into an array?
<p>Why is this string being made into an array and how do I stop it please?</p>

<p><strong>Snippet: (to get date)</strong>  </p>

<pre><code>public function setDate(){
        $this-&gt;date = date("Y-m-d");
        return $date;
    }


public function getDate(){
    return $this-&gt;date;
}


$date = getDate();
</code></pre>

<p><strong>Snippet: (part of query)</strong></p>

<pre><code>        -&gt;where_equal_to(
            array(
                'sales_date' =&gt; $date
            )
        )
</code></pre>

<p>When you dump the query its doing this...</p>

<p><strong>Output:</strong></p>

<hr>

<pre><code>array(1) { ["sales_date"]=&gt; array(11) { ["seconds"]=&gt; int(42) ["minutes"]=&gt; int(10) ["hours"]=&gt; int(14) ["mday"]=&gt; int(3) ["wday"]=&gt; int(1) ["mon"]=&gt; int(10) ["year"]=&gt; int(2011) ["yday"]=&gt; int(275) ["weekday"]=&gt; string(6) "Monday" ["month"]=&gt; string(7) "October" [0]=&gt; int(1317647442) } }
</code></pre>

<hr>

<p>instead of something like this...</p>

<hr>

<p><strong>Output:</strong></p>

<pre><code>array(1) { ["sales_date"]=&gt; "2011-10-03 00:00:00" }
</code></pre>

<hr>
