I would try to setting an element of an array with the following code:
if (empty($table['keys'])){
$table['keys']=array(
'primary_key'=>array(
'id'
)
);
}
But I get the 'illegal string offset...' warning. I also tried another array key, in case of the 'keys' index would be reserved keyword, but it makes the same error.