Re: diffence between two numbers...

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

 



On Friday 15 April 2005 13:35, Tristan.Pretty@xxxxxxxxxxxxxxxx wrote:
> I need to know the difference between two numbers...
> eg:
>
> $a = 7;
> $b = 27;
> somefunction($a, $b)
> // outputs "20"
>
> $a = 10;
> $b = 12;
> somefunction($a, $b)
> // outputs "2"

function difference ($a, $b) {

	return (max($a, $b) - min($a, $b));

}

> 
> etc...
> does that exist?

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgpwlcn17fzRx.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux