Jump to content

[SOLVED] Not in array


lnenad

Recommended Posts

I'm trying to compare arrays, so i'm checking if an element from array1 is not in array2 and if that happens add that element from array1 to array2

 

But no matter how i try to write not in it gives me bunch of errors.

 

if (!in_array($svi[$s],$ukupno)) { $ukupno += $svi[$s]; }

 

Fatal error: Unsupported operand types in xxx on line 80

 

Even when i try != true and == false or != 1 still i gives me an error, how do i fix this?

Link to comment
https://forums.phpfreaks.com/topic/135358-solved-not-in-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.