In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into inches equivalent using PHP as our programming language. I hope you will find my work useful.
programming projects , thesis and capstone projects, IT consulting
work and web development work kindly contact me in the following email address for further details. If you want to advertise in my website kindly contact me also in my email address also. 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
<?php
function ConversionToInches($centi)
{
$inch = 0.3937 * $centi;
echo("<h2> Inches equivalent is " . $inch . "</h2>\n");
}
$centi = 100;
echo "<style> body { font-family:arial; size:12px } </style>";
echo "<h2> Centimeter To Inches Converter in PHP </h2>";
echo "<h3> Written By Mr. Jake Rodriguez Pomperada, MAED-IT </h3>";
ConversionToInches($centi);
echo "<h2> End of Program </h2>";
?>