Re: PHP problem


Subject: Re: PHP problem
From: Jared Armstrong (jared@alyeskaresort.com)
Date: Thu Oct 10 2002 - 14:32:19 AKDT


You might need to do a string compare instead, depending upon where your
values are coming from. Form input is usually considered a string.

strcmp(), strcasecmp(), strncmp(), etc.

Try using is_numeric() to test it.

Mike Barsalou wrote:
>
> It turns out that the equate isn't working as it should...so even though the
> variables $output and $value are the same when printed; the else section
> always gets executed:
>
> PRINT "Output:".$output.": Value:".$value.": <BR>\n";
>
> if ($output == $value)
> {
> PRINT "The values are equal";
> } else
> {
> PRINT "The values are not equal <BR>\n";
> }
>
> Produces this:
>
> Output:217: Value:217:
> The values are not equal
>
> Does this give anyone more information or an idea on what to do?
>
> Mike
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.

-- Binary/unsupported file stripped by Listar --
-- Type: text/x-vcard
-- File: jared.vcf
-- Desc: Card for Jared Armstrong

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Oct 10 2002 - 14:35:14 AKDT