This topic is locked

Change number format does not work

7/10/2009 11:16:44 PM
PHPRunner General questions
A
aszeto author

Hi,
I entered "$value = $item_value/1024; $item_value = number_format($value);" in the View as Custom. The field's value does not change at all. I also tried "$item_value = number_format($item_value);" for testing as well. The field's value does not change either.
Can anyone help?
Thanks in advance,
Anne

Sergey Kornilov admin 7/12/2009

Anne,
you need to assign a result of calculation to $value variable. $item_value variable needs to be defined as well.
Probably the code you looking for is:

$value = number_format($value/1024);
A
aszeto author 7/12/2009

Anne,

you need to assign a result of calculation to $value variable. $item_value variable needs to be defined as well.
Probably the code you looking for is:

$value = number_format($value/1024);


Thanks for the reply.
Actually I have tried this before, but it did not work. So I thought I should use the field name '$item_value' and see if it works, and apparently, it didn't. I tried setting it to Number in the Visual Editor. It displayed the number with commas and 2 digits after the period. But I want to divide the $value by 1024 and get it displayed in a number with commas, and somehow, the code '$value = number_format($value/1024);' is ignored or did not get executed.
Any ideas?
Thanks,
Anne

Sergey Kornilov admin 7/12/2009

Anne,
I recommend to post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation.