CalcBuilder Forum

Calculator commands

User anonymous 2011-10-18 20:31:22


Can I just ask, are you able to add 'if' 'elseif' 'and' and 'or' commands into the php code? I know you can normally, but have tried within the calculator and it doesn't seem to like it?

Also, can you use the value of 2 columns matching input to determine an end value in the matrix?

Kind Regards

Moonsoft support 2011-10-18 20:31:56

all valid php code is executed by the calculator, so you can include as many complex lines as you want. If calculate button throws an eval error, then you should check your code to be sure it's valid php.

About the matrix, what you get is an array of values, indexed by first column, so you can loop using foreach, matching values or getting the right fact, all you can get with php functions and operators will work.

Best regards

Support/development 40 hours

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

Buy now!

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

Buy now!