On Oct 18, 2007, at 9:50 PM, Bastien Koert wrote:
Are you sure that the value is a string? If its numeric, then try
the check without the quotes around the value
http://www.php.net/manual/en/language.operators.comparison.php
"If you compare an integer with a string, the string is convert
if (!in_array($component_reference, array(5,17)))
// ...
More compact.
On Oct 18, 2007, at 5:49 PM, "ron.php" <[EMAIL PROTECTED]>
wrote:
When $component_reference is 5 or 19 I don't want the echo statement
to
output to the screen. What is the correct syntax? What I have
below isn't
w
Are you sure that the value is a string? If its numeric, then try the check
without the quotes around the value
bastien> From: [EMAIL PROTECTED]> To: php-general@lists.php.net> Date: Thu, 18
Oct 2007 19:49:55 -0500> Subject: [PHP] IF command> > When $component_reference
is 5 or 19 I don't w
Hi, here is the code:
if ( ($component_reference != "5") AND ($component_reference != "19") ) {
echo "" .
$component_name . "";
}
2007/10/19, ron.php <[EMAIL PROTECTED]>:
> When $component_reference is 5 or 19 I don't want the echo statement to
> output to the screen. What is the correc
> Someone knows how to use the IF command ?
>
> I need two expressions as such as IF (exp1 AND exp2) ...
>
>
> computer programmer
^
A "computer programmer" not knowing the "IF command"?
Really, what computer do you program?
-Stathis.
PS: Sorry, I just can't resist. It's
Hi
http://www.php.net/manual/en/control-structures.php
for example :
if ($firstname == "Eduardo" && $lastname == "Melo") {
print ("I know you")
}
else {
print ("I don't know you");
}
Regards
Girish
--
www.girishnath.co.uk
- Original Message -
From: "Eduardo Melo" <[EMAIL
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Eduardo Melo blurted
> Someone knows how to use the IF command ?
Have you Read The Fine Manual Eduardo?
Try www.php.net I'm not sure if there is a translation for your language
though.
- --
Nick Wilson
Tel:+45 3325 0688
Fax:
7 matches
Mail list logo