title: How get array by string key?
body: <p>For example I need get value by string key <code>$string</code>: </p>
  
  <pre><code>var_dump($arr['privateContacts']); // Works
  
  $string = 'privateContacts';
  $arr[$string]; // Does not work returns NULL
  </code></pre>
  
  <p><strong>Function:</strong></p>
  
  <pre><code>function existSecureField($arr, $string, $key){ var_dump($arr[$string]); die();...
  </code></pre>
  
  <p><strong>Call function:</strong></p>
  
  <pre><code>existSecureField($secureFields, 'privateContacts', 1)
  </code></pre>
  
  <p><strong>Var_dump in function existSecureField():</strong></p>
  
  <pre><code>var_dump($arr);
  
  array(2) { ["privatePersonal"]=&gt; array(4) { [0]=&gt; int(1) [1]=&gt; int(1) [2]=&gt; int(1) [3]=&gt; int(1) } ["privateContacts"]=&gt; array(2) { [1]=&gt; int(1) [2]=&gt; int(1) } }
  </code></pre>