Results 1 to 2 of 2

Thread: How to format the price from 0 to 0.00

  1. #1
    Thread Starter
    Veteran harry0013's Avatar
    Join Date
    Mar 2012
    Location
    Philippines
    Posts
    351
    Thanks
    5
    Thanked 4 Times in 4 Posts

    How to format the price from 0 to 0.00

    How to format the price from 0 to 0.00. Below code is not working and when 0 is entered, it still shows as $0 and not 0.00

    $price_out = ereg_replace("[^0-9.]", "", $price_out);
    $price_out = number_format($price_out, 2, '.', ',');
    $price_out = cp_pos_currency($price_out);

  2. #2
    Veteran barukar's Avatar
    Join Date
    Sep 2010
    Location
    Brasil, São Paulo, SP
    Posts
    6,785
    Thanks
    186
    Thanked 742 Times in 623 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    -------------------------------------------------------------------------------------------
    Projects: ClassiNoiva - Classimóveis - vocênoenem - i50 - Clube DETRAN

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Pagination Format
    By junnydc in forum ClassiPress General Discussion
    Replies: 3
    Last Post: November 21st, 2011, 12:23 AM
  2. Price Field Format
    By gomeetpete in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: July 27th, 2010, 12:58 PM
  3. [TUTORIAL] Fixing Proper Price Format
    By scarstens in forum ClassiPress General Discussion
    Replies: 18
    Last Post: May 24th, 2010, 02:29 AM