Re: problem with currency signs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Angelo,

You may create a separate table called "currencies" and put two fields like "currency_id" and "currency_desc" in it. Insert all the currencies you're using to this table. At the end, you'll have a currency_id for each of your currencies. Now, you can use those ID numbers in your forms and in your codes for any kind of data collection and data manipulation. It's always better to define frequently used variables using this way.

Regards
Serdar

Angelo Zanetti wrote:
Hi guys,

Im having problems with the Euro and Pound currency signs and storing them etc...

here is my scenario. I have a menu/list of currencies available for selection, HTML below for the signs:

$ £
€

When listed in the browser they show fine.
When I want to save them, they are saved as the actual sign in the DB and not the HTML code for the symbol, which isnt a train smash, however, when I try compare the values in the DB with the predefined list of currency symbols, I get some problems.

The below if statement doesnt seem to resolve:


if ($row['p_currency'] == "€") //where € is also the value in the DB


even if the value is €, or € it still never reverts to true...

So is there a special way I should be treating the symbols and maybe a special way I should be storing them? or comparing them?

thanks in advance


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux