A very simple program that I wrote to convert days into years and weeks using PHP as our programming language the code is very simple and easy to understand.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Sample Program Output
Program Listing
index.php
<html>
<title>Convert Day's Into Years and Weeks in PHP </title>
<style>
body {
font-family:arial;
font-weight:bold;
size:15px;
};
</style>
<body>
<?php
echo "<br>";
echo "<h2>Convert Day's Into Years and Weeks in PHP </h2>";
echo "<p> Written By Mr. Jake R. Pomperada, MAED-IT </p>";
$days = 789;
$years = $days/365;
$num1 = $days - ($years*365);
$weeks=$days/7;
$num1=$days-($weeks*7);
echo "<br>";
echo "Display Result";
echo "<br><br>";
echo "The given days is ".$days.".";
echo "<br><br>";
echo $days. " days = ".round($weeks,0)." weeks OR ".round($years,0)." years equivalent.";
?>
No comments:
Post a Comment