php - compare two multidimensional arrays of object and set new property true/false pending match on larger set -
i have array of objects example: larger set: array( [0] stdclass object( [id] => 1, [name] => monkey, [sub] => ), [1] stdclass object( [id] => 1, [name] => tooth, [sub] => tip ), [2] stdclass object( [id] => 1, [name] => who, [sub] => knows ), ) smaller set array( [0] stdclass object( [id] => 1, [name] => monkey, [sub] => ) desired out come: array( [0] stdclass object( [id] => 1, [name] => monkey, [sub] => help, [selected] => yes ...