I am trying to search a multi-dimensional associative array and change a value after searching. Here is what my array looks like
$arr=Array ( [0] => Array ( [1] =>
Array ( [keyword] => 2014
[count] => 97
[percent] => 4.91 )))
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.
So I am trying to do something like:
if(in_array("2014", $arr))
{
//then add 100 to count that is 100+97
}
So what will be the best way to go about this.
Note: I am trying to search a value in the array and if found then update the value of count key on that particular index. The last part is as important as first.
Ahmar