note 111572 deleted from function.in-array by cmb

From: Date: Sun, 15 Sep 2019 13:14:49 +0000
Subject: note 111572 deleted from function.in-array by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212206@lists.php.net to get a copy of this message
Note Submitter: justinjohnmathews at gmail dot com ---- I think, "in_array" can be used with "range" function to check a number(dynamic value) is in between of other two numbers. <?php $i = 5; // Dynamic value if (in_array(range(1, 10), $i)) { echo 'Your number is in between of range array'; } ?>

« previous php.notes (#212206) next »