PHP Newbie - RegEx
by "Billy O'Connor" <billyo(at)kennetweb.co.uk>
|
Date: |
Fri, 5 Jul 2002 14:31:44 +0100 |
To: |
<hwg-servers(at)hwg.org> |
|
todo: View
Thread,
Original
|
|
Hi,
I'm having trouble doing a simple regex in PHP and wonder if anyone can
help?
Can someone tell me how I find out if a variable contains a digit? I have a
script that is passed either a digit or URL's. If the variable contains a
digit, I want the script to extract info from a database, else if it is a
URL, go to the URL.
I've tried this, amongst other things and just cannot figure it out....
if ($ID =~ /[0-9]/) {
do this
} else {
do this
}
I hope someone can help.
ATB,
Bill.
--
Billy O'Connor
Kennet Web
~~~~~~~~~~~~~~~~~~~
Web Design & Hosting
Solutions For Business
~~~~~~~~~~~~~~~~~~~~~
T: 07021 107 411
E: billyo(at)KennetWeb.co.uk
W: http://www.KennetWeb.co.uk
HWG: hwg-servers mailing list archives,
maintained by Webmasters @ IWA