<?php 
include_once '../../config/connect.php';
$select = mysqli_query($link, "SELECT SUM(amount_topay) FROM loan_info") or die (mysqli_error($link));

while($row = mysqli_fetch_array($select))

{

$select1 = mysqli_query($link, "SELECT * FROM systemset") or die (mysqli_error($link));

while($row1 = mysqli_fetch_array($select1))

{

$currency = $row1['currency'];

echo $currency.number_format($row['SUM(amount_topay)'],2,".",",")."</b>";

}

}

?>