I have a two-dimensional array like this:
$data = array(
1 => array(
id => 1,
software_id => 121,
name => "Microsoft Office 2010",
version => 14.0.4763.1000
),
2 => array(
id => 2,
software_id => 121,
name => "Windows Live Movie Maker",
version => 14.0.4763.1000
)
...
)
And I have set of data like this in the database. The array must match the values of the SQL or else a new set of values in the array are added or removed.
- How am I able to compare if the array exactly matches the values with the same column values as the array in the database?
- How am I able to check if a new set of values are added in the array and not present in the database?
- How am I able to check if a set of values are removed in the array and not present in the database?