RE: RE: [PHP] Validating form field text input to be a specific v ariable type
| From: | Ford, Mike [LSS] | Date: | Wed, 07 Apr 2004 11:01:57 +0000 |
| Subject: | RE: RE: [PHP] Validating form field text input to be a specific v ariable type | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-182608@lists.php.net to get a copy of this message | ||
On 07 April 2004 03:03, holmes072000@charter.net wrote:
> > From: "Merritt, Dave" <Dave.Merritt@ArvinMeritor.com>
> >
> > Okay seems to makes sense, but when I do the following it doesn't
> > appear to be working correctly, or I'm viewing my logic incorrectly
> > one:
> >
> > if ( (int)$PageOptions['Default'] == $PageOptions['Default'] ) {
>
> This works:
>
> if(strcmp((int)$PageOptions['Default'],$PageOptions['Default'])==0)
This does too:
if ((string)(int)$PageOptions['Default'] === $PageOptions['Default'])
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211