This topic is locked

Custom Value, control decimal places

10/31/2010 9:58:57 AM
PHPRunner General questions
C
crhys author

Hi,
I would like to control the value of decimal places that are being inserted into a custom value, here is the code that I have in the List Page of the Events editor:-
$record["Custom_value2"]=$data["Conversionwon"];
is there any way of controling the format of the data going into Custom Value 2 ?
Any help appreciated
btw, I am still using 5.2(Build5482) I will update to 5.3 once I sign off this project.
Rhys

A
ann 11/4/2010

Rhys,
Here is a sample code for this:

$record["Custom_value2"]=number_format($data["Conversionwon"],2)



More info:

http://www.w3schools.com/php/func_string_number_format.asp