Calc Builder Support

Calc Builder support
Public write access is disabled. Please login

Decipher a code 31.12.2012 03:29

I'm trying to understand this code I grad from your "Estimate business card" example. Can you please explain this?:

for ($i = 1; $i

Re: Decipher a code 31.12.2012 09:41

for ($i = 1; $i


This is a conditional statement mostly used to go through an array(list) of elements. In calcbuilder you can use it to get elements with more than one value from form. For example, if you use a "multiple option" field with "var" name 'multiple' , you can see in form checkboxes to select. You can use 'multiple' values in 'code' as array. To get all values separated with commas you could use 'for' structure like this:

for($i=0;$i' is to apply number format to them

for ($i = 1; $i r$i"."1,2);");

First we declare for only for 5 elements, because it´s the number of vars we have.

for ($i = 1; $i te '$var' as string with $i from the loop and '1', so in first step the result will be $var11, in next step $var21 and so on. This variable (the same we declare before loop) is assigned to the result of number format function.


This 'for' statement is the shortcut for doing this:

Hope this helps. Regards,

Editado por MSTeam - 31.12.2012 09:43
Moonsoft Team
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback