Converting float value to integer value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpmagesh
    New Member
    • Nov 2008
    • 119

    Converting float value to integer value

    Hai friends,

    {$PRODUCTS_PRIC E}

    This is my variable i dont know why they used { } for that. in that product_price i m storing a integer value like 112.00 etc.., when i change to another radio option, it automatically changes the value to 112.

    What can i do to correct this to normal decimal value like 112.00,? help me dude!!!


    thank you,
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    if it's a price use the money_format() function.

    Comment

    • phpmagesh
      New Member
      • Nov 2008
      • 119

      #3
      Originally posted by Dormilich
      if it's a price use the money_format() function.

      Thankyou for your advice friend, but still i am not getting correct value (Note: i m editing the XT-Commerce shopping cart software).

      They using smarty in this php. is that a matter plays in this Variable

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        maybe i can tell you more with a convenient code snippet. the money_format() function does indeed need some requiremants... ..

        regards

        Comment

        • phpmagesh
          New Member
          • Nov 2008
          • 119

          #5
          Originally posted by Dormilich
          maybe i can tell you more with a convenient code snippet. the money_format() function does indeed need some requiremants... ..

          regards

          Can you please tell me what are the requirements to work with that money_format() function,

          is it possible for me to use that function,

          Thanks in advance for your help and your time for me..

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            all you need is described in the reference, maybe read some of the comments too. you should at least use set_locale().

            regards

            Comment

            • phpmagesh
              New Member
              • Nov 2008
              • 119

              #7
              Originally posted by Dormilich
              all you need is described in the reference, maybe read some of the comments too. you should at least use set_locale().

              regards

              thankyou for your guidlines i got my output,

              nice to meet you,

              Comment

              Working...