Valores novos e antigos da tabela associativa

função assoc diff ($ db vals, $ form vals) {
$ delete = array
diff ($ db vals, $ form vals);
$ new = array diff ($ form vals, $ db_vals);
return array (‘new’ => $ new, ‘delete’ => $ delete);
}