This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

The Number helper contains functions useful when working with numbers.

Loading the Helper

$nh = Loader::helper(‘number’);


$r = $nh->flexround($value);

When given a numeric $value, rounds the value only out to its most significant digit.

print $nh->flexround(‘4.250’); // outputs 4.25 print $nh->flexround(‘5.1’); // outputs 5.1 print $nh->flexround(‘4.000’); // outputs 4
Loading Conversation