Showing posts with label Convert Day's Into Years and Weeks in PHP. Show all posts
Showing posts with label Convert Day's Into Years and Weeks in PHP. Show all posts

Sunday, April 29, 2018

Convert Day's Into Years and Weeks in PHP

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.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

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.";
  
  
?>