Hi ppl,
I have a problem on programming, Iam trying to create a
function that
can check whether a number is
0 1 2
6 7 8
12 13 14
18 19 20
24 25 26
the function will just return true if the number is one of
the above
but without mentioning the numbers staticly
meaning not like this:
if( $num==0 && $num==1 && $num==2 &&
$num==6 ..and so on )
but something like this:
function progression( $num, $diffBetween )
{
if( $num%2 )
return true ;
else
return false ;
}
can anyone help?....
thanks in advance
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.
yahoo.com/group/PHP-OOP/
<*> To unsubscribe from this group, send an email to:
PHP-OOP-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|