Results 1 to 7 of 7

Thread: money_format gives error

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved money_format gives error

    Having a code like
    PHP Code:
    <?php

        $a 
    1232322210.44;

        
    setlocale (LC_MONETARY'en_US');

        echo 
    money_format ("%n"$a);
        echo 
    "\n";
        echo 
    money_format ("%i"$a);
        echo 
    "\n";

    ?>
    gives an error like Fatal error: Call to undefined function money_format() in C:\Program Files\Apache Group\Apache2\htdocs\test\test.php on line 7. Am I missing something?
    Last edited by nebulom; Jul 25th, 2005 at 01:05 AM.

  2. #2
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: money_format gives error

    Quote Originally Posted by php documentation
    Note: The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, so money_format() is undefined in Windows.

    Yes I guess you are.

  3. #3
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: money_format gives error

    use sprintf or vsprintf functions instead. 

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: money_format gives error


  5. #5
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: money_format gives error

    if you read the dox.. it says there it is not properly implemented on windows platforms

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: money_format gives error

    Dumb me. Hehe. Sori for bothers. I guess I should read everything. One problem though, I hardly understand English. I guess this is resolved. Thanks again.

    Edit: Oh, php documentation is a vbf user now. I didn't know that. He/She originally posted a quote. Hehe.
    Last edited by nebulom; Jul 25th, 2005 at 01:07 AM.

  7. #7
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: money_format gives error

    Quote Originally Posted by nebulom
    Dumb me. Hehe. Sori for bothers. I guess I should read everything. One problem though, I hardly understand English. I guess this is resolved. Thanks again.

    Edit: Oh, php documentation is a vbf user now. I didn't know that. He/She originally posted a quote. Hehe.

    I always see BOL being quoted so what's the difference with php documentation.. eheheheh


    and I guess you are using translator for all your posts?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width