I am pulling my hair out with this one.
I have tried everything I can think of to make the following work.
First 5 lines work fine:
[php]
$Sdollars = mysql_query($sumsalestotal, $link);
$Sdollars = mysql_fetch_row($Sdollars);
$Sdollars = money_format('%i', $Sdollars[0]);
$Sdollars = sprintf("%10s", '$'.$Sdollars);
echo "$Sdollars";
[/php]
The above works fine
[php]
$ndivideby = money_format(’%i’, $Sdollars[0]);
$ndivideby = sprintf("%10s", ‘$’.$ndivideby);
echo “$ndivideby”; doesn’t print anything
echo “$Sdollars[0]”; doesn’t print anything
[/php]
The real problem is that need to use an existing variable to create a new variable that will be the result of 2 other variables x/y.
It doesn’t work. I have done this in other languages with no effort. I have beat this thing to death with no resolve. Any help would be greatly appreciated.
Greg Hill