number checker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux