title: php check if value exists in associative array
body: <p>I have array such below:</p>
  
  <pre><code>$import_emails = [];
  
  $import_emails[]=[
      'to'=&gt;$to,
      'from'=&gt;$from,
       'cc'=&gt;$cc,
       'subject'=&gt;$subject,
      'text'=&gt;$text,
      'date'=&gt; date('Y-m-d H:i:s',strtotime($date))
  ];
  </code></pre>
  
  <p>Example array  data:</p>
  
  <pre><code>Array
       (
      [0] =&gt; Array
      (
          [to] =&gt; nastya.gorobets95@gmail.com
          [from] =&gt; babboe1 babboe1 &lt;test.babboe1@gmail.com&gt;
          [cc] =&gt; 
          [subject] =&gt; Test Subject
          [text] =&gt; Test content.
          Please, write me later
          Thanks!
  
          [date] =&gt; 2017-06-29 18:04:53
      )
  
  [1] =&gt; Array
      (
          [to] =&gt; Anastasia Gorobets &lt;nastya.gorobets95@gmail.com&gt;
          [from] =&gt; babboe1 babboe1 &lt;test.babboe1@gmail.com&gt;
          [cc] =&gt; babboesignal@edu-crm.com
          [subject] =&gt; Tema
          [text] =&gt; Bla bla bla
           Test email! :)
  
          [date] =&gt; 2017-07-02 11:55:50
      )
  
   )
  </code></pre>
  
  <p>How can I check if value, for example 'nastya' exists in arrays item ['to'] ? 
  Maybe there is some function for it? Thanks!</p>