So I'm iterating over this $elements array. I am trying to get the key and value from each individual item of the $elements array, which is also an array (which I will call $element).
Here's my code:
$options = array();
foreach ($elements as $element) {
if ($element['#active']) {
continue;
}
$options[$element]['#query'] = $element['#indexed_value'];
}
This doesn't work. How would I get the value of $element['#query'] and $element['indexed_value'] as a key => value pair?
$options[$element['#query']]=...$elementas an array and as an array key. It does not matter what your script is doing; it will not work.