> -----Original Message----- > From: Bob Eldred [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 20, 2003 1:21 AM > To: Jake McHenry > Subject: Re: [PHP] Similar functions? > > > Wouldn't is_numeric work? > > ----- Original Message ----- > From: "Jake McHenry" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, November 19, 2003 10:24 PM > Subject: [PHP] Similar functions? > > > > Can anyone tell me if there are similar functions in php as > javascript > > isNaN, or do I just have to do a > > > > if (preg_match('/([EMAIL PROTECTED]&*()_=+|\?/><,.;:{}-])/', > > $_POST['Personal_Hotel_CC_Number']) == 0){} > > > > > > I know the above doesn't work, would there be an easier way > for me to > > find if any of the chars are not numbers? > > > > I could do: > > > > if (preg_match_all("/([0-9])/", $var, $match) == 16){} > > > > But AMEX cards are only 15 digits... > > > > It's for credit card verification. > > > > > > Thanks, > > > > Jake McHenry > > Nittany Travel MIS Coordinator > > http://www.nittanytravel.com > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >
Thanks, that works perfectly. So much easier than doing a regex for it. Thanks, Jake McHenry Nittany Travel MIS Coordinator http://www.nittanytravel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php