"; $url = $_SERVER['REQUEST_URI']; $path = explode("/", $url); // var_dump($path[1]); if ($path[1] == "bcu") $db = "logisys3_bcu"; else if ($path[1] == "bnu") $db = "logisys3_bnu"; else if ($path[1] == "dud") $db = "logisys3_dud"; else if ($path[1] == "rcub") $db = "logisys3_rcu"; else if ($path[1] == "ru") $db = "logisys3_rur"; $Query = "select fboardcode, fboardname, funivcode, funivname, date_format(now(), '%d/%m/%Y %r') as fdate FROM {$db}.masboard, {$db}.control c order by fboardcode"; $result = mysqli_query($conn, $Query); $row = mysqli_fetch_assoc($result); $Query2 = "select distinct fdegree, fdescpn from {$db}.entdeg;"; $result2 = mysqli_query($conn, $Query2); $row2 = mysqli_fetch_assoc($result2); ?>

Course wise statistics

Select Degree
3) { $lastthree = substr($num, strlen($num) - 3, strlen($num)); $restunits = substr($num, 0, strlen($num) - 3); // extracts the last three digits $restunits = (strlen($restunits) % 2 == 1) ? "0" . $restunits : $restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for ($i = 0; $i < sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if ($i == 0) { $explrestunits .= (int)$expunit[$i] . ","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i] . ","; } } $thecash = $explrestunits . $lastthree; } else { $thecash = $num; } return $thecash; // writes the final format where $currency is the currency symbol. } ?>