I have the following code, where I wanted to:
1) Color the text display of $strPrice to RED.
2) Display the $strPrice to be formated like $2,380 instead of $2380.95 (Adding thousand comma and removing the two decimals)
Can some body please help me on this.
<?php
$strPrice = $currency_logo . " " . $arr_row["item_price"];
if ($currency_id <> 1)
{
$curresult = mysql_query("select currency_id, currency_abbr, currency_buyingrate,currency_sellingrate from currencytype where currency_id=$currency_id");
if (mysql_num_rows($curresult))
{
$currencyrow = mysql_fetch_array($curresult);
$intPrice = round($arr_row["item_price"] / $currencyrow["currency_sellingrate"],2) ;
$strPrice = $currency_logo . "" .$intPrice ;
}
}
?>
<?print ($strPrice);?>