Posted by Faree on 09/29/05 08:50
$diff=50;//Set this to Maximum difference u can allow between numbers. for($X=count($_AV);$X>=0;$X--) { if ($_AV[$X]== $arg) { $result=$X; break; } else if(($_AV[$X]<$arg) AND ($arg-$_AV[$X] <=$diff) { $result=$X; break; } else if(($_AV[$X]>$arg) AND ($_AV[$X]-$arg<=$diff) { $result=$X; break; } else echo "No Matych found wth in this limit"; } Hope this will work for u.
[Back to original message]
Copyright © 2005-2006 Powered by Custom PHP Programming