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) ?? 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)) { 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 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
Archived
This topic is now archived and is closed to further replies.