Skip to content

Tag: object

converting an object to an array in laravel

I’m trying to compare two arrays and use the difference of them to remove data from another array but as I use the resulting array to do a array_diff_key using an array_flip it returns; array_diff_key(): Expected parameter 1 to be an array, object given this is the code and I’ve tried converting t…