Changes

Jump to: navigation, search

Visual Basic Comparison and Logic

32 bytes removed, 17:09, 7 August 2007
PHP Logical Operators
</table>
== PHP Visual Basic Logical Operators ==
''Logical Operators'' are also known as ''Boolean Operators'' because they evaluate parts of an expression and return a ''trueTrue'' or ''falseFalse'' value, allowing desicions decisions to be made about how a script should proceed.
The first step to understanding how logical operators work is to construct a sentence rather than to look at a script example right away. Let's assume we need to check some aspect of two variables named $var1 intVal1 and $var2intVal2. Our sentence might read:
''If $var intVal1 is less than 25 AND $var2 intVal2 is greater than 45 display a message.''
Here the logical operator is the "AND" part of the sentence. If we were to express this in PHP Visual Basic we would use the comparision operators we covered earlier together with the && AND logical operator:
<pre>
if If (($var1 < 25) && ($var2 > 45)
echo 'Our expression is true';

Navigation menu