cooldude832 Posted August 1, 2007 Share Posted August 1, 2007 I know you can say if($x<=5 && $x <=10) but is there a way to say if(5<=$x<=10) ?? Quote Link to comment https://forums.phpfreaks.com/topic/62779-fast-way-to-write-5/ Share on other sites More sharing options...
trq Posted August 1, 2007 Share Posted August 1, 2007 No shorter, but there are always other ways. if (in_array($x,range(5,10)) { Quote Link to comment https://forums.phpfreaks.com/topic/62779-fast-way-to-write-5/#findComment-312557 Share on other sites More sharing options...
cooldude832 Posted August 1, 2007 Author Share Posted August 1, 2007 only bloats it up more i'll stick with what i got for now Quote Link to comment https://forums.phpfreaks.com/topic/62779-fast-way-to-write-5/#findComment-312558 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.