could you cast as a float/double before inserting?  $number = (double)

don't know what would happen to the comma, but i assume it would just get

just a guess/thought

                      "Dillon, John"                                                   
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
            >                    cc:                                     
                                               Subject:  [PHP-DB] number_format 
                      11/05/2003 10:29                                                 

I want to show a number from a database in the format x,xxx.00 in a
textfield, then if it is changed by the user I want to post the value of
number to a decimal field.  However, once you number_format the number it
becomes a string, and numbers like 3,379.90 give a value of 3 when posted
the database, which is hinted at in the notes on number_format.  I suppose
need a string to number function - can someone tell me what this might be
called please?



CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
are confidential. If you are not the named recipient please notify the
sender and immediately delete it. You may not disseminate, distribute, or
forward this e-mail message or disclose its contents to anybody else.
Copyright and any other intellectual property rights in its contents are
the sole property of Cantor Fitzgerald.
     E-mail transmission cannot be guaranteed to be secure or error-free.
     The sender therefore does not accept liability for any errors or
     omissions in the contents of this message which arise as a result of
     e-mail transmission.  If verification is required please request a
     hard-copy version.
     Although we routinely screen for viruses, addressees should check this
     e-mail and any attachments for viruses. We make no representation or
     warranty as to the absence of viruses in this e-mail or any
     attachments. Please note that to ensure regulatory compliance and for
     the protection of our customers and business, we may monitor and read
     e-mails sent to and from our server(s).

For further important information, please read the  Important Legal
Information and Legal Statement at

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to