I have a form field that uses some Javascript to format user input 'price' field from say 1000 to 1,000.00 in real time before the form is submitted ..when I submit the form some PHP is reading the data and printing the results
Javascript bit is num = num.substring(0,num.length-(4*i+3))+','+
PHP bit is 'price' => number_format($this->ipsclass->input['price'], 2, '.', ''),
The problem is if the preformatted Price is 2,450.50 ..all it displays 2.00 or if the input is 24,500 displays 24.00
if works fine if I remove the ',' from the javascript The database field has a data type float 9,2 cause I need to sort search results