Switch statements work well for these situations as well. They might be
faster than checking for the item in a list from an array since an array
must be created and searched through.
General programming tip: your method *definitely* wouldn't work. The or
operator has precendence over the == ope
;, "me.uk", "org.uk")){
MT> //Then do this
MT> }
MT> maybe??
MT> -Original Message-
MT> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
MT> Sent: Thursday, January 03, 2002 4:22 PM
MT> To: php-general
MT> Subject: [PHP] If Statement with more th
to:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 4:22 PM
To: php-general
Subject: [PHP] If Statement with more than one conclusion
How can I do an if statement with more than one conclusions
Something like this I know this is not correct just an example of what
I what to do
If($ext=="com&
How can I do an if statement with more than one conclusions
Something like this I know this is not correct just an example of what
I what to do
If($ext=="com"or"net"or"org"or"info"){
Then do this
}
If($ext=="com.uk"or"me.uk"or"org.uk){
Then do this
}
--
Best regards,
rdkurth
4 matches
Mail list logo