• 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

Laravel Multi-language routes without prefix

Trying to iterate over a mongodb cursor twice - failing

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

Vimeo API: how to save a vimeo into a subfolder?

Laravel: HTML in notification

Two buttons one form

Laravel excel maatwebsite 3.1 import, date column in excel cell returns as unknown format number. How to solve this?

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

Exact alternate to mcrypt_encrypt in PHP 7.2

woocommerce change position of price

PHP's array_map including keys

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

MySQL - Connection failed: No route to host

About Contact Privacy policy Terms and conditions