php3-list | 199903
Date: 03/03/99
- Next message: Mr. Poet: "[PHP3] PHP within Layers?"
- Previous message: % !: "[PHP3] Help! bison error during PHP 3.0 make"
- Next in thread: Richard Lynch: "Re: [PHP3] Remove characters from a string"
- Maybe reply: Richard Lynch: "Re: [PHP3] Remove characters from a string"
- Reply: Frederic DEZORZI: "Re: [PHP3] Remove characters from a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hai Friends
I am using PHP3 for my server side scripts and MySQL for my database. Now I
am facing a problem in updating the database.
I have some data like this $price="$5,123.00". When I upload this data to a
float column in the MySQL database, it will not accept the data. Now from
PHP3 itself I want to remove the currency symbol ($) and comma (,) from
the data and then upload this data to the float column. Can you pls
susggest me some ideas of how to remove these symbols and get the data as
pure floating point number.
I am not a professional in this field. But I am slowly getting into this
field and wish to do some real projects for my clients.
<? #I will repeat the problem.
$price=$5,123.00;
#Doing some sort of operations on $price, I must get the value
$result=funct($price);
$result=5123.00;
?>
Thanks in advance
Sheni R. Meledath
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Mr. Poet: "[PHP3] PHP within Layers?"
- Previous message: % !: "[PHP3] Help! bison error during PHP 3.0 make"
- Next in thread: Richard Lynch: "Re: [PHP3] Remove characters from a string"
- Maybe reply: Richard Lynch: "Re: [PHP3] Remove characters from a string"
- Reply: Frederic DEZORZI: "Re: [PHP3] Remove characters from a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

