Boofo
07-15-2002, 11:48 PM
Can someone please tell me if I am right in figuring out this line of code below? I am just using an example, but I want to see if what I think I learned is what actually is. :)
(I know this sounds pretty basic to most of you, but I want to learn this stuff and I have to start somewhere, I guess) :)
Here is the code:
if ($post[userid]!=$bbuserinfo[userid] and $bbuserinfo[canreportposts]==1)
Now, if I read this right, it means that if the post does NOT belong to the user, and they ARE able to report posts, then display whatever template you want to display. Does the "!=" mean not where "==" means does? Or can you use a single "=" to do the same thing? If I want to make it so it would display the template if it WAS the user's post, would I do this?
if ($post[userid]==$bbuserinfo[userid] and $bbuserinfo[canreportposts]==1)
If there is another way of doing this, too, please tell me. :) I'll take all of the help in understanding this I can get.
(I know this sounds pretty basic to most of you, but I want to learn this stuff and I have to start somewhere, I guess) :)
Here is the code:
if ($post[userid]!=$bbuserinfo[userid] and $bbuserinfo[canreportposts]==1)
Now, if I read this right, it means that if the post does NOT belong to the user, and they ARE able to report posts, then display whatever template you want to display. Does the "!=" mean not where "==" means does? Or can you use a single "=" to do the same thing? If I want to make it so it would display the template if it WAS the user's post, would I do this?
if ($post[userid]==$bbuserinfo[userid] and $bbuserinfo[canreportposts]==1)
If there is another way of doing this, too, please tell me. :) I'll take all of the help in understanding this I can get.