Jump to content

Format money value inconjunction with setlocale


Ne0_Dev

Recommended Posts

Hi Guys,

 

I'm after a bit of help/guidance on an issue I am currently trying to resolve.  I currently have a page where I use setlocale(LC_MONETARY) to automatically format values to a specific currency depending on which country parameter I pass to this function.  At the moment I only require one currency for all values on the page.

 

I am now trying to figure out a way to have different currency values on the same page and just wondered if it is possible to specify multiple setlocale on a page?

 

If so I would need to use either an if/else/if statement or a switch statement to determine which one to use based on the country value of the record being returned from the database.

 

At the moment I am specifying the setlocale in a php block at the top of the page.

Any thoughts or suggestions are most appreciated.

 

Ne_Dev

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.