ms.buggy Posted April 22, 2010 Share Posted April 22, 2010 Hello, I'm trying to check if the variable starts with certain digits, possible begins are +367 and +352. I tried to set if set something like this: if ((gsm.charAt(0)!="+" && gsm.charAt(1)!=3 && gsm.charAt(2)!=6 && gsm.charAt(3)!=7) || (gsm.charAt(0)!="+" && gsm.charAt(1)!=3 && gsm.charAt(2)!=5 && gsm.charAt(3)!=2)){ Can someone help me with this issue? Link to comment https://forums.phpfreaks.com/topic/199396-is-stament-with-two-conditional-sets/ Share on other sites More sharing options...
JAY6390 Posted April 22, 2010 Share Posted April 22, 2010 You should use a regular expression to get a match. Also why are you using charAt? That's not PHP that's javascript Link to comment https://forums.phpfreaks.com/topic/199396-is-stament-with-two-conditional-sets/#findComment-1046457 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.