I'm trying to see if for example the value "2001" exists in the following multidimensional array for the [terms] key and if it does, I will do nothing. If it doesn't exist, I need to add it into the array under [terms]:
Array
(
[year] => Array
(
[singular] => Year
[plural] => Years
[filterable] => 1
[use_on_listing] => 0
[compare_value] => =
[terms] => Array
(
[0] => 2014
[1] => 2013
[2] => 2012
[3] => 2010
[4] => 2009
[5] => 2015
[6] => 1997
)
)
)
Can't seem to figure it out using array_search though. Any help would be greatly appreciated.