get false value in callback function in array_filter
<p>I have an array like this:</p>

<pre><code>Array ( [PlasticContainmentTrained] =&gt; 0 [AvoidDustSpreadTrained] =&gt; 1 [PostRenCleaningTrained] =&gt; 0 [EntranceWarningSign] =&gt; 1 [IntObjectCovered] =&gt; 1 [IntHVAC] =&gt; 0 [IntWindowClosed] =&gt; 1 [ExtWindowClosed] =&gt; 0 [IntDoorClosed] =&gt; 1 [ExtDoorClosed] =&gt; 0 [DoorCovered] =&gt; 1 [IntFloorCovered] =&gt; 0 [ExtGroundCovered] =&gt; 1 [ExtVertContainment] =&gt; 0 [WasteContained] =&gt; 1 [AllChipsDebris] =&gt; 0 [WorkAreaSurface] =&gt; 0 [DustClearanceTesting] =&gt; 1 [WasteHandlingTrained] =&gt; 1 [MaintainContainmentTrained] =&gt; 0 [PostingWarningSignTrained] =&gt; 1 [DescriptionOfRenovation] =&gt; bnfdbndljnbljdfnbljkdnfljn [TrainedWorkers] =&gt; jvndfjnvdfvjndfljvndfljvn [DustSamplingTechnicanNames] =&gt; jvnfjdfnlvjdfjvndfljndflj [QualificationCopies] =&gt; dfjvdjf [KitUsed] =&gt; vjnjkdsfnvljdnvdjfvndfjbnjgbnndfn [TestLocations] =&gt; jdfjnvljndfvjdnfvjdnfvjkfnlj [CertifiedRenPerformed] =&gt; fdjndfljvndfljvndfjvndflk [ReportAttachPath] =&gt; undefined [IAccept] =&gt; undefined [ProjectId] =&gt; 1 ) 
</code></pre>

<p>and i want to filter this array but only 'undefined' values not '0'. i have used array_filter() function for this:</p>

<pre><code>function filterValue($var)
        {

            if($var=='0')
            {
                return 0;
            }
            elseif($var!='undefined')
            {
                return $var;
            }
        }
        $this-&gt;data = array_filter($_POST, "filterValue");
</code></pre>

<p>but it also filters '0' values. how can i do this.</p>

<p>Please any body help me...</p>
