I am trying to search an array for a key value that I don’t know until runtime. So I want to build the key value as a variable and then search the array to see if that key exists, as follows:
$arrkey = $this->content[4][$i]['gridrowid'] . "-" . $this->content[5][$z]['gridcolumnid'];
if (array_key_exists ($this->content[6] , $arrkey)) {
In this example $arrkey is a string “1-1” and the array $this->content[6] looks like:
[6]=>
array(1) {
["1-1"]=>
string(1) "2"
But it is not finding the key. Or at least it is not entering the “if” statement. Thanks