Re: Conversion Float => Integer

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

 



Hello Ashley,

On 2017-09-16 14:40:16 AshleySheridan hacked into the keyboard:
> There are a few ways:
> 
> $int = intval($float);

Argh! -- This was exactly what I was looking for!

Had a provisory solution in for of a stringfunction which looks
absolutely courious :<D but it worked!!!

Normally I should not show it, but here it is:

  $AVE    = $TOT / date('t', strtotime($date)) . '.';
  $POS    = strpos($AVE, '.');
  $LEN    = strlen($AVE);
  $LENGHT = $LEN - $POS;
  $AVE = substr_replace($AVE, '', $POS, $LENGHT);

It is a KILLER I know!

Have a nice evening!

-- 
Michelle Konzack        Miila ITSystems @ TDnet
GNU/Linux Developer     00372-54541400

Attachment: signature.asc
Description: Digital 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