1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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