• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to convert the int value to inch in PHP [closed]

php


PHP Snippet 1:

function cm2inches($cm)
{
     $inches = $cm/2.54;
     $inches = $inches%12;
     return sprintf('%d ins', $inches);
}
echo cm2inches(162);

PHP Snippet 2:

3 ins

Related Snippets

No result using makeStyles Material UI in react 18

Laravel views are showing from cache on one server but works fine on other server

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Pass a select with mysqli_fetch_row to a table

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

How to use PHPCBF to fix one issue at a time?

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

Google API Heatmap Layer exception, why?

printing all running session variable in laravel 5.1

PHP only Hit Counter?

How can I get user id from session in javascript?

How can I create a Download Page with post php method?

How to map the two arrays with a duplicate value?

Add Class in html Dynamically in PHP

Encrypt in php and decrypt in Dart(flutter)

About Contact Privacy policy Terms and conditions