: Is there an easier way (or more efficent).  This is more a curiosity than
: anything else.

Easy and efficient, as long as $archives_needed is always positive:

$archives_needed = int($archives_needed + 0.5);

Otherwise, if $archived_needed can be negative:

$archives_needed = int($archives_needed + ($archived_needed < 0 ? -0.5 : 0.5));

Still more efficient than sprintf.

-- tdk

Reply via email to