The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Can someone please explain?
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: PHP Code:
PHP Code:
|
#2
|
|||
|
|||
I believe that you are correct with your explanation of the logic of the line of code.
!= Does not equal if(1 != 2) would return true == Equals if(1 == 2) would return false You use = when assigning a variable. |
#3
|
||||
|
||||
Thank you very much. Now all I need to figure out is what you mean by the "=" being used to assign a variable. Can you please give me an example?
Quote:
|
#4
|
||||
|
||||
Code:
$foo = 'bar'; Code:
if ($foo = 'bar') { |
#5
|
||||
|
||||
Ok, now I see what you mean. It's almost like Turbo Pascal when you assign the variables then. And if I wanted to assign a global variable to be able to use anywhere on the site, is global.php where I would put it or could it be done in functions.php?
(I love this stuff! ) Quote:
PHP Code:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|