title: array_filter with assoc array?
body: <p>I am using array_filter to do something like this:</p>
  
  <pre><code>function endswithy($value) {
      return (substr($value, -1) == 'y');
  }
  
  $people = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Danny", "Joe");
  $withy = array_filter($people, "endswithy");
  var_dump($withy);
  </code></pre>
  
  <p>BUT with the more option in filter for  example</p>
  
  <pre><code>$people = array(
               "Johnny"=&gt;array("year"=&gt;1989, "job"=&gt;"prof"),
               "Timmy"=&gt;array("year"=&gt;1989,  "job"=&gt;"std"),
               "Bobby"=&gt;array("year"=&gt;1988),
               "Sam"=&gt;array("year"=&gt;1983),
               "Tammy"=&gt;array("year"=&gt;1985),
               "Danny"=&gt;array("year"=&gt;1983),
               "Joe"=&gt;array("year"=&gt;1989,"job"=&gt;"prof"));
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>$people = array(
               array("name"=&gt;"Johnny","year"=&gt;1989, "job"=&gt;"prof"),
               array("name"=&gt;"Timmy","year"=&gt;1989,  "job"=&gt;"std"),
               array("name"=&gt;"Bobby""year"=&gt;1988),
               array("name"=&gt;"Sam","year"=&gt;1983),
               array("name"=&gt;"Tammy","year"=&gt;1985),
               array("name"="Danny","year"=&gt;1983),
               array("name"="Joe","year"=&gt;1989,"job"=&gt;"prof"));
  </code></pre>
  
  <p>How Can I got the only this people (endwith <code>y</code> and <code>year=1989</code>  and <code>job=prof</code>) ,Can I use array_filter?
  or any build-in function to do this?</p>
  
  <pre><code>$people = array(
                   "Johnny"=&gt;array("year"=&gt;1989, "job"=&gt;"prof")
    );
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>$people = array(
                   array("name="Johnny","year"=&gt;1989, "job"=&gt;"prof")
    );
  </code></pre>