====== valueSum() ======

''float **valueSum**(string //question//)''

''float **valueSum**(string //question//, string|array //items//)''

''float **valueSum**(array //variables//)''

Calculates the sum of the answer codes for all items in a question (e.g. a scale), for selected items, or for a list of variables.

  * //question// -- ID of a question (as a string)
  * //items// -- A list (string or array) of items e.g.
    * ''array(2,4,6)''
    * '''1-3,5,7'''
  * //variables// -- A list (array) of variable IDs, as stated in the **Variables Overview** e.g.
    * ''array('AB01_01', 'AB01_02', 'BB01', 'BC01')''

===== Examples =====

Calculate the sum of all responses in scale AB01.

<code php>
$sum = valueSum('AB01');
</code>

Sum of items 2, 4, 6 and 8 in scale AB01.
<code php>
$sum = valueSum('AB01', array(2,4,6,8));
</code>

Sum of the first 4 items in scale AB01.
<code php>
$sum = valueSum('AB01', '1-4');
</code>

Sum of responses in variables AB01_01, AB01_03 and BB01_02.

<code php>
$sum = valueSum(array('AB01_01','AB01_03','BB01_02'));
</code>

The same command written a little more clearly:

<code php>
$sum = valueSum(
         array(
           'AB01_01',
           'AB01_03',
           'BB01_02'
         )
       );
</code>