![]() |
in_array(): Wrong datatype for second argument
Warning: in_array(): Wrong datatype for second argument on line 123
PHP Code:
PHP Code:
|
Try to change:
PHP Code:
PHP Code:
|
Didn't work :(
|
before that line:
PHP Code:
PHP Code:
|
if (!in_array($getnew['threadid'], explode(',', $threadids))) {
|
Hmmm . . . still don't work, I donno how it didn't since you are all amazing coders . . . Is there any other way of redoing the in_array. I also tryed a combination of all of thoes lines but nothing seems to want to work.
|
I'm assuming the contents of $threadids is a list of thread id's. If so the code above should work ^^ I use it all the time with global admin cp options :)
|
@Dean: you should look at the code before trying to help:
PHP Code:
but it hasn't been intialised in the first loop. that's why i thought the initialisation of it in front of the loop should do it... |
Putting
PHP Code:
HOWEVER! This code gives you the exact same results and is cleaner and simpler: PHP Code:
You may want to do some benchmarking on your own board to see which method is faster on your forums. Keep in mind that the results (speed-wise) will depend solely on how many new threads / posts there actually are in the result. Good luck :) |
lol I am so stupid . . . The reason the other wern't working was cause I was uploading to the wrong site, but I wasn't paying attection when I clicked connect so that is why.
But ya it works now, so thanks. |
All times are GMT. The time now is 02:34 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|