PT Cruiser - Property in France - Debt Consolidation - Find jobs - Debt Consolidation

PDA

View Full Version : currency simble in php


animatronico
Sep 1st 2006, 5:32 pm
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

Chaos King
Sep 1st 2006, 5:41 pm
The USD symbol is $ ( the dollar sign ). This is also used to indicate variables in php.

animatronico
Sep 1st 2006, 6:15 pm
that is the problem I have so many $ that I don't know what to change:confused:

Chaos King
Sep 1st 2006, 6:27 pm
Just run a search and replace in notepad or something.

Search $ and replace it with the pound sign.

animatronico
Sep 1st 2006, 6:32 pm
I've found this that maybe it.
if($_GET[SelectedPackage] == $a1[PriceID])

Chaos King
Sep 1st 2006, 6:37 pm
To be honest, now I do not understand what you are trying to accomplish. Can you explain yourself more and possibly provide examples?

animatronico
Sep 2nd 2006, 8:13 am
To be honest, now I do not understand what you are trying to accomplish. Can you explain yourself more and possibly provide examples?

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");

?>

smatts9
Sep 2nd 2006, 8:39 am
$Prices .= "<td align=right>$$a1[PriceValue]</td>\n</tr>\n";

$$al outputs the number with the $ sign in front of it. Change it to ->


$Prices .= "<td align=right>£$a1[PriceValue]</td>\n</tr>\n";

animatronico
Sep 2nd 2006, 10:31 am
$Prices .= "<td align=right>$$a1[PriceValue]</td>\n</tr>\n";

$$al outputs the number with the $ sign in front of it. Change it to ->


$Prices .= "<td align=right>£$a1[PriceValue]</td>\n</tr>\n";


Thanks so much it is working now:)