Reputation: 8509
Hello i am trying to return the differences between two arrays but i am gettig this error that i do not understand, this is my code:
$unMatched = array_diff($matchedTickets, $cart['tickets']);
These are the two arrays:
$cartTickets:
array (size=1)
0 =>
array (size=5)
'id' => int 13
'class' => string 'Regular' (length=7)
'description' => string 'Lorem ipsum dolor' (length=17)
'fee' => int 100
'quantity' => int 1
$matchedTickets:
array (size=1)
0 =>
array (size=3)
'id' => int 13
'class' => string 'Regular' (length=7)
'fee' => float 100
Can somebody please tell me what i am doing wrong here?
Upvotes: 1
Views: 1440
Reputation: 8509
I had to add the index 0 to each of them to get it to work. I dont know why they're like that, but it works now.
Upvotes: 1