Quote:
Originally Posted by tmhall
Thanks for your replies, guys.
I came pretty close to that same solution myself last night, except I didn't initialize the array first* and I was putting the code in showthread.php instead of global.php. Unfortunately I get the same results either way:
Code:
Warning: in_array(): Wrong datatype for second argument in /includes/functions_showthread.php(640) : eval()'d code on line 213
For testing purposes I put print_r($buddylist); in showthread.php and it comes up:
(I'm on a test server and have one person on my buddylist, userid = 2)
* Is that really necessary? For some reason I thought it wasn't.
|
found my goof...sorry
PHP Code:
<if condition="in_array($post['userid'], $buddylist)">
Remove $post[username] from your buddylist<br />
<else />
Add $post[username] to your buddylist<br />
</if>
note the singlequote in the conditional array $post.
see if that helps any,