will anyone tell me what im doing wrong here?
thanks .:leon:.
<?php
/ trying to test if $sleep is a number contained in the $range /
$sleep = "5"; $low = "1"; $high = "10"; $range = range($low, $high);
if ($sleep == $range) { echo "true"; }
?>
Have you used LISP? 😉 if ($sleep >= $low && $sleep <= $high)
Hi,
if you still want to use [FONT=courier new]range()[/FONT] (which is more complicated), then try following:
$sleep = 5; $low = 1; $high = 10; $range = range($low, $high); if (in_array($sleep, $range)) { echo "true"; }
wizkid
thanks wiz
i appreciate it.