Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About djb2002

  • Rank
  1. Thank you so much for all the replies and explanations - That makes perfect sense. I think was one of those things. The more time I spent looking the harder I could find it. All working great now - Thanks again.
  2. Thanks for your reply. I think I've spent too long thinking about this - Getting me confused. I understand what you are saying, and that is correct. I see what you mean - the OR statements are contradicting one another. Any idea how this should be written ? - I'm wanting it to progress if $number is anything other than 101 or 102 (as well as the length being less than 9). Thanks again
  3. Thanks for your reply. I've been trying that and different combinations. This is what I had changed it to: <?php $number = $str; if (strlen($number) < "9" AND ($number1 <> "101" OR $number1 <> "102")){ } but that seems to be stopping cases now where $number=101. Maybe I have got the syntax wrong ?
  4. I'm updating some PHP/MySQL code and struggling to get it to work correctly. At the moment I have the code as follows: if (strlen($number) < "9" AND $number1 <> "101"){ } else if (strlen($number) > "14") { } else { ...........the rest of the code goes here to action after filtering out the above. I want the first if command to match if the length is less than 9 characters long, and the $number1 is either 101 or (I want to add in 102). I've tried amending the first IF statement to read as follows, but that fails: if (strlen($number) < "9" AND ($number1 <> "101") OR ($number1 <> "102")){ } I'm expecting it to be something very straightforward, but I've looked at it for so long now I just cannot see it. Thanks in advance for any help.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.