![]() |
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:
|
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. |
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:
|
Code:
$foo = 'bar'; Code:
if ($foo = 'bar') { |
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:
|
All times are GMT. The time now is 12:57 PM. |
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:
|