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