Multidimensional Associative array email check
<p>I have an array multidimensional associative array.</p>

<pre><code>Array
(


[0] =&gt; Array
        (
            [username] =&gt; uname1
            [name] =&gt; fullname1
            [email] =&gt; uname1@email.com

        )
[1] =&gt; Array
        (
            [username] =&gt; uname2
            [name] =&gt; fullname2
            [email] =&gt; uname2

        )
[2] =&gt; Array
        (
            [username] =&gt; uname3
            [name] =&gt; fullname3
            [email] =&gt; uname3@email

        )
[3] =&gt; Array
        (
            [username] =&gt; uname4
            [name] =&gt; fullname4
            [email] =&gt; uname4@

        )

}
</code></pre>

<p>It should validate email address using the regular expression.The return array should consists of an array with only valid array.The array should be </p>

<pre><code>Array
(


[0] =&gt; Array
        (
            [username] =&gt; uname1
            [name] =&gt; fullname1
            [email] =&gt; uname1@email.com
}
</code></pre>

<p>since [1,2,3] have invalid email address.</p>
