title: PHP Searching multidimensional associative array
body: <p>I am trying to search a multi-dimensional associative array and change a value after searching. Here is what my array looks like</p>
  
  <pre><code> $arr=Array ( [0] =&gt; Array ( [1] =&gt; 
      Array ( [keyword] =&gt; 2014 
              [count] =&gt; 97 
              [percent] =&gt; 4.91 )))
  </code></pre>
  
  <p>So what I am trying to do is to search for keyword and if found then increase the count on that particular index where keyword was found. </p>
  
  <p>So I am trying to do something like:</p>
  
  <pre><code>if(in_array("2014", $arr))
  {
  //then add 100 to count that is 100+97
  
  }
  </code></pre>
  
  <p>So what will be the best way to go about this. </p>
  
  <p>Note: I am trying to search a value in the array and <strong>if found then update the value of count key on that particular index</strong>. The last part is as important as first. </p>
  
  <p>Ahmar</p>