I'm semi-new to PHP and looking for a good way to match arrays. Note that I'm going to write my arrays here in python syntax because its way easier to type, but I'm working in PHP.
I have an array that is something like this: {3:4,5:2,6:2}
Then I have an array of arrays, with the inners arrays having the same basic form as the array above. I'd like to write a function that returns all arrays that match the given array, ignoring extra values.
So I want the array above to match {3:4,6:2,5:2} or {3:4,5:2,6:2,7:2}
but not {3:4,5:2} or {3:4,5:2,6:3}
I probably could get it to work, but I doubt the code would be all that great. So I'd love the opinion of better PHP developers.
Thanks