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 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!