RE: [PHP] Re: Using Logical OR operator in IF statement???

2001-10-24 Thread Martin Towell
[EMAIL PROTECTED] Subject: Re: [PHP] Re: Using Logical OR operator in IF statement??? >> if (substr($sString,(strlen($sString)-1)!="-")) { I think you meant either substr($sString,strlen($sString)-2) or substr($sString,-1) >> print "You can't have a dash at the end

Re: [PHP] Re: Using Logical OR operator in IF statement???

2001-10-24 Thread Mark
>> if (substr($sString,(strlen($sString)-1)!="-")) { I think you meant either substr($sString,strlen($sString)-2) or substr($sString,-1) >> print "You can't have a dash at the end of your string."; >> } >> >> and this works: >> if (substr($sString,0,1)!="-") { >> print "You can't have a dash at

[PHP] Re: Using Logical OR operator in IF statement???

2001-10-21 Thread Brad Melendy
Ok, it works!! Thanks to everyone for their suggestions and answers. This group is a great resourse. Thanks again ...Brad "Brad Melendy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks James, > I tried a regular expression comparison first, but

[PHP] Re: Using Logical OR operator in IF statement???

2001-10-21 Thread Brad Melendy
Thanks James, I tried a regular expression comparison first, but it was eluding me. I'm new to PHP (trying to convert form ASP) and part of this is me trying to convert my ASP/VBSCRIPT to PHP. ;-) I actually have a FOR loop evaluated when the conditions of the IF statement are met, and I suspec

[PHP] Re: Using Logical OR operator in IF statement???

2001-10-21 Thread James, Yz
Hi Brad, This worked for me: .. but I'd tend to go for a regex as a solution to what you're after, which involves less code: Just my thoughts... James "Brad Melendy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > Ok, this works: > > if (su