Line deleting using Array_Diff();

HI,

I am new here. I need help> I am stuck in my project :wink:


Warning: array_diff() [function.array-diff]: Argument #1 is not an array in C:serverhtdocsmoderation.php on line 12

Warning: array_diff() [function.array-diff]: Argument #1 is not an array in C:serverhtdocsmoderation.php on line 12

Warning: array_diff() [function.array-diff]: Argument #1 is not an array in C:serverhtdocsmoderation.php on line 12

Warning: implode() [function.implode]: Invalid arguments passed in C:serverhtdocsmoderation.php on line 14

Thanks i Badly need help :slight_smile:

BOTH arguments MUST be an array when using the ARRAY_DIFF() Function ( http://us.php.net/manual/en/function.array-diff.php ).

In your foreach Loop you are taking an element out of an array and comparing it TOO an array.

The array_diff is used to compare the difference of 2 arrays. It sounds like you want to take elements OUT of an existing array and create a NEW (smaller) array. The array_diff is not a good choice for this except perhaps when you are DONE and you want to verify that you have done this. Then you can compare the Original with the New array using the array_diff.

Sponsor our Newsletter | Privacy Policy | Terms of Service