For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > December 2004 > Re: [PHP-WIN] newbie: a very simple question (I hope)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] newbie: a very simple question (I hope)
Janet Valade

2004-12-15, 3:57 pm

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com