I need to run a check as to whether an array coming from a form input is identical to an array pulled from a database. I haven't really used array_diff() much. Because I don't know exactly how the 2 arrays might differ, it seems that I must do the comparison twice, switching the parameters around, in order for the comparison to be complete:
if ((array_diff($first_array,$second_array)) || (array_diff($second_array,$first_array)))
I think the above will take into account all possibilities (or so my testing indicates), but I just want to make sure there isn't a better and cleaner way to do this.