$post[userid] is just a number, right? so it's like
!$vboptions['shownlinks'][999] AND $vboptions['shownlinks'][999] = true
Maybe I'm not getting how $vboptions['shownlinks'] works?
'shownlinks' is just an arbitrary string, it could be anything as long as other code isn't trying to use the same variable. In fact you probably don't even need to use $vboptions. In any case, $vboptions['shownlinks'] is an array used to store whether or not a user's links have been shown. When the code starts generating the page, $vboptions['shownlinks'] doesn't exist so it works just like an array where every value is false, so the first time the code checks user 999 it will be false and !$vboptions['shownlinks'][999] will be true. The part after the AND assigns "true" to a user's slot in the array, and since an assignment has a value (the value being assigned), it will always be "true". So it doesn't affect the logic if the if statement, it just gets the assignment done.
Does that make any sense? I'm not so good with the explaining.
ETA: Oh, well...I just noticed that the above code was missing "condition=" because I messed up when editing. Maybe that's what was confusing.
--------------- Added [DATE]1283474565[/DATE] at [TIME]1283474565[/TIME] ---------------
Quote:
Originally Posted by DamasGate
Helo,
I use this code
So you know where "$favo" comes from? I don't know what that is.