It doesn't have a use in only PHP but in all programming languages.
It's a math thing .. u can get a remainder of a division.
10%8 = 2
12%8 = 4
10%5 = 0
12%5 = 2
Simple application:
$ppl = 23;
$grpsize = 7;
echo ("when $ppl people are divided over groups of $grpsize, ".
$ppl%$grpsize ." people are ungrouped.");
This operator can be used for more complex situations.
Cheers;
Eelco.
> Hi!
>
> what is the use of %
> Is it called modulo..what is it's use in PHP.?
>
>
> Thanx!
> Dhaval Desai
>
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]