currency simble in php

Discussion in 'JavaScript' started by animatronico, Sep 1, 2006.

Thread Status:
Not open for further replies.
  1. #1
    I need to change the USD simble TO GBP on my php script but I don't know how the USD simble looks like in my php document.
    can some one tell me what it shoud look like. pls
     
    animatronico, Sep 1, 2006 IP
  2. Chaos King

    Chaos King Peon

    Messages:
    88
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The USD symbol is $ ( the dollar sign ). This is also used to indicate variables in php.
     
    Chaos King, Sep 1, 2006 IP
  3. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that is the problem I have so many $ that I don't know what to change:confused:
     
    animatronico, Sep 1, 2006 IP
  4. Chaos King

    Chaos King Peon

    Messages:
    88
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just run a search and replace in notepad or something.

    Search $ and replace it with the pound sign.
     
    Chaos King, Sep 1, 2006 IP
  5. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've found this that maybe it.
    if($_GET[SelectedPackage] == $a1[PriceID])
     
    animatronico, Sep 1, 2006 IP
  6. Chaos King

    Chaos King Peon

    Messages:
    88
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    To be honest, now I do not understand what you are trying to accomplish. Can you explain yourself more and possibly provide examples?
     
    Chaos King, Sep 1, 2006 IP
  7. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Right see if you look in this page http://capoeira.cn/prices.php
    you will see the options

    Start Me Up! Standart, 1 month, 3 offers $14.95
    Grow Up Platinium, 1 month, 15 offers $25.00
    Shake Up Gold, 2 months, 10 offers $34.95
    I need to change the $ to ₤
    and some of the files that I need to change look like this.
    see how many $$$$ signs wich one do I change?
    <?
    require_once("conn.php");
    require_once("includes.php");

    //get the prices
    $q1 = "select * from cars_prices, cars_priority where cars_prices.PriorityLevel = cars_priority.PriorityLevel order by PriceValue";
    $r1 = mysql_query($q1) or die(mysql_error());

    $col = "white";

    while($a1 = mysql_fetch_array($r1))
    {
    if($col == "white")
    {
    $col = "dddddd";
    }
    else
    {
    $col = "white";
    }

    $Prices .= "<tr bgcolor=$col>\n\t<td align=center>";

    if($_GET[SelectedPackage] == $a1[PriceID])
    {
    $Prices .= "<input type=radio name=\"SelectedPackage\" value=\"$a1[PriceID]\" checked>";
    }
    else
    {
    $Prices .= "<input type=radio name=\"SelectedPackage\" value=\"$a1[PriceID]\">";
    }


    $Prices .= "</td>\n\t<td>$a1[PackageName] ";

    $Prices .= "<sup><font color=#990000>$a1[PriorityName]</font></sup>";

    if($a1[Duration] == '1')
    {
    $Prices .= ", $a1[Duration] month,";
    }
    else
    {
    $Prices .= ", $a1[Duration] months,";
    }

    if($a1[offers] == '1')
    {
    $Prices .= " $a1[offers] offer</td>\n\t";
    }
    else
    {
    $Prices .= " $a1[offers] offers</td>\n\t";
    }

    if($a1[PriceValue] > '0')
    {
    $Prices .= "<td align=right>$$a1[PriceValue]</td>\n</tr>\n";
    }
    else
    {
    $Prices .= "<td align=right>Free!</td>\n</tr>\n";
    }
    }

    if($_GET[e] == '1')
    {
    $error = "Select a package, please!";
    }


    if(ereg("register.php", $_SERVER[HTTP_REFERER]))
    {
    $NewAgentMessage = "<font face=verdana color=black size=2><b>Thank you for your registration!</b><br><font face=verdana size=1>You are able to post a free listing!</font><br>";
    }

    //get the templates
    require_once("templates/HeaderTemplate.php");
    require_once("templates/PricesTemplate.php");
    require_once("templates/FooterTemplate.php");

    ?>
     
    animatronico, Sep 2, 2006 IP
  8. smatts9

    smatts9 Active Member

    Messages:
    1,089
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    88
    #8
    
    $Prices .= "<td align=right>$$a1[PriceValue]</td>\n</tr>\n";
    
    PHP:
    $$al outputs the number with the $ sign in front of it. Change it to ->

    
    $Prices .= "<td align=right>£$a1[PriceValue]</td>\n</tr>\n";
    
    PHP:
     
    smatts9, Sep 2, 2006 IP
  9. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks so much it is working now:)
     
    animatronico, Sep 2, 2006 IP
Thread Status:
Not open for further replies.