Skip to main content
CalcBuilder logo
CalcBuilder Forum

sections to calculate an average

User chm

hello i need the number of sections to calculate an average, how do i code it?
Thanks for the help

Moonsoft support

Hello,

You can get the number of sections, getting the number of occurrences of any field on this section. I.e., if you have a field with variable name 'myfieldinsidesection', you can use this in code section:

$numsections=count($myfieldinsidesection);

so, $numsections is the number of sections.

Regards,

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!