How to test if array contains at least one element
<p>How should I test if an array contains at least 1 element (rather than just being an empty array <code>$myarray = array();</code>)?</p>

<p>Is there a THE way?</p>

<p>E.g.</p>

<pre><code>if ($myarray) { }

if (count($myarray)) { }

if (count($myarray) &gt; 0) { }
</code></pre>

<p>Or is there a THE wrong way?</p>
