How do I format this to output GB pounds
Posted: Thu May 26, 2005 4:58 am
Hi,
I would like to output the following code to show the total value of all assets within my database in GB pounds.
This is erroring, as I have tried to format the code. I know that the following is wrong, but I dont know what to do;
Please help.
I would like to output the following code to show the total value of all assets within my database in GB pounds.
Code: Select all
$sql = "SELECT SUM(value) AS tot FROM dedicated";
$result = mysql_query($sql) or die(mysql_error());
$line = mysql_fetch_array($result, MYSQL_ASSOC);
setlocale(LC_MONETARY, 'en_GB');
echo money_format('0','$line['tot']')."\n";This is erroring, as I have tried to format the code. I know that the following is wrong, but I dont know what to do;
Code: Select all
echo money_format('0','$line['tot']')."\n";