• 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

Combine array with same value and add other [duplicate]

Detect emoticons in string

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

Yii2 redirecting to previous page after login

Symfony/Form add attribute based on the data

PHP file_get_contents function

Stop caching for PHP 5.5.3 in MAMP

get folder directory from input type file - PHP

How to redirect to another page and call a Function there on Angular ng-click

How to submit the custom form data in database in WordPress without plugin using ajax?

Too few arguments to function PendingResourceRegistration::name(),1 passed in C:xampphtdocsproject outesweb.php on line 18 and exactly 2 expected

generate an Excel file using PHP

str_replace or preg_replace random number from string

Parsing JSON File to array in PHP

retrieve data from database using session

About Contact Privacy policy Terms and conditions