php-windows Digest 16 Dec 2004 16:39:01 -0000 Issue 2508
Topics (messages 25162 through 25165):
newbie: a very simple question (I hope)
25162 by: Patrick Roane
25163 by: Jason Barnett
25164 by: Janet Valade
Re: php code auditing tool
25165 by: David
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I am trying some excercises in a book and one of the
excercises says to:
Assign values to two variables. Use comparison
operators to test whether the first value is:
1. the same as the second
2. less than the second
3. Print the result of each test to the browser.
My question is, how do I print the result? For
example, say I use the following expression:
$x = 3;
++$x < 4; // false
print $x;
I know how to print out the value of $x, but not the
test result of 'true or false'.
Thanks-
=====
----------------
"forget your lust for the rich man's gold. All that you need, is in your soul.
You can do this if you try. All that I want for you my son, is to be satisfied"
~ Lynard Skynard
--- End Message ---
--- Begin Message ---
I know how to print out the value of $x, but not the
test result of 'true or false'.
A couple of ways to do this. Probably the easiest is to cast the true /
false answer to an int and then echo that answer.
$x = 3;
$bool = ++$x < 4;
echo (int) $bool;
--- End Message ---
--- Begin Message ---
Patrick Roane wrote:
I am trying some excercises in a book and one of the
excercises says to:
Assign values to two variables. Use comparison
operators to test whether the first value is:
1. the same as the second
2. less than the second
3. Print the result of each test to the browser.
My question is, how do I print the result? For
example, say I use the following expression:
$x = 3;
++$x < 4; // false
print $x;
I know how to print out the value of $x, but not the
test result of 'true or false'.
$x = 3;
$result = ++$x < 4; // false
var_dump($result);
Janet
>
Thanks-
=====
----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You
can do this if you try. All that I want for you my son, is to be satisfied"
~ Lynard Skynard
--
Janet Valade -- janet.valade.com
--- End Message ---
--- Begin Message ---
"Irvin Piraman" <[EMAIL PROTECTED]> escribi� en el mensaje
news:[EMAIL PROTECTED]
> Is there a free PHP code auditing tool available for windows?
>
> Thanks.
>
> Irvin
--- End Message ---