In a html page, I would like to appear, for example, the following text:
Amount: 50
where
Amount - is a fixed word
50 - is a sum of the values from a table column.
I have the php script (let's call it "Script.php") where I calculate the sum:
$query_ = mysqli_query($link, "SELECT SUM(table_column) AS amount FROM table");
$row = mysqli_fetch_assoc($query_);
$sum = $row['amount'];
echo "<font color='red', size='5'>$sum";
Currently the html code looks like this:
<ul>
<li>Some info: some info</li>
<li>Amount: ??? </li>
</ul>
What should I put instead of "???" in order to obtain what I want? Thanks.
UPDATE: the php code and the html code are in two different files.
@Machavity: My question is not the same as the one considered to you as duplicated by me. As I have mentioned, the php code and the html code are in two different files. Please revise your "marked as duplicate" or refer to another question which I have duplicated. Thanks.