PHP 8.1.2
I have 2 arrays:
$Rex = array('');
$tfields = $db->fetch_assoc_all();
$tfields holds multiple records from an sql query.
I am trying to create an empty record in an indexed array of associative arrays. I just want the key but with no value. This statement worked with warnings on older versions of PHP:
foreach($tfields as $key => $value)//use data from tfields to build next query
{
....
....
$Rex[0][$value['ColName']] = '';//line that generates error
}
But get the error mentioned above. It seems to imply that I am dealing with a string. Is $value not an array?