Web lists-archives.com

Re: [PHP] Conversion Float => Integer




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