How to convert display of poll options results?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mirce
    New Member
    • Feb 2007
    • 3

    How to convert display of poll options results?

    Please help.

    I would like to convert a display of poll options results in percent from decimal numbers to floating-point numbers? How to do it?


    Best regards

    Emir
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Welcome to The Scripts!

    How do you display a float? Or do you want to convert an integer to a float?
    Or do you want to display an integer with comma's. I don't really get what you mean.
    Converting an int value to float can be done
    [php]$amount = (float) $amount;
    [/php]
    Displaying an integer with comma's like this:
    [php]
    $i=12345;
    echo sprintf("x=%5.2 f",(float)$i/100); // ==> result 123.45
    [/php]

    Ronald :cool:

    Comment

    • Mirce
      New Member
      • Feb 2007
      • 3

      #3
      Originally posted by ronverdonk
      Welcome to The Scripts!

      How do you display a float? Or do you want to convert an integer to a float?
      Or do you want to display an integer with comma's. I don't really get what you mean.
      Converting an int value to float can be done
      [php]$amount = (float) $amount;
      [/php]
      Displaying an integer with comma's like this:
      [php]
      $i=12345;
      echo sprintf("x=%5.2 f",(float)$i/100); // ==> result 123.45
      [/php]

      Ronald :cool:

      I have installed a phpBB forum at next URL:

      http://www.hcu.untz.ba

      This site is dedicated to handicapped persons. I have posted a poll at this site. The results of voting on poll questions are displayed as integer. I would like to display voting results as floating-point numbers. However, I don't know where is placed a file (or template) in which calculations of voting are done.

      Please help me to change the display format of voting and eventually the form of voting calculations if they are done as integer.

      Best regards

      Comment

      Working...