1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to make thousand marker in text box

Discussion in 'PHP' started by a_alrizky, Jan 22, 2009.

  1. a_alrizky

    a_alrizky New Member

    Joined:
    Jan 22, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi, im wondering how to make a text box with thousand marker.

    The textbox is numerical only.

    So when people type 4000000 for example,

    the textbox will automatically display 4,000,000

    Is anyone know how to do that?

    Thank you.
     
  2. Coward

    Coward New Member

    Joined:
    Jan 22, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    <?php
    
    $number = 50000000;
    
    echo number_format($number,0,'.',','); 
    
    ?>
    
     

Share This Page