I need to add an element to an array only if a condition is met.
I want to add an element of a given needle exists in a haystack.
The following is the traditional way of doing it.
if(in_array($options_array[$i], $meta_info_keys)) { $array = append_to(); } 