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.