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
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
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
working. Thanks for your help. Ron
if ( ($component_reference != "5") OR ($component_reference != "19") ) {
echo "" .
$component_name . "";
}
--
> 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
Original Message -
From: "Eduardo Melo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 6:30 PM
Subject: [PHP] if command
Someone knows how to use the IF command ?
I need two expressions a
-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:
Someone knows how to use the IF command ?
I need two expressions as such as IF (exp1 AND exp2) ...
thank's
eduardo melo
computer programmer
_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/sup
9 matches
Mail list logo