• 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

How to send image,audio or video through the WhatsApp API - PHP

Laravel php artisan serve to mimic HTTPS

Send same name multiple checkbox values via ajax

Show Custom Data in Woocommerce Order Details Admin Area

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

CodeIgniter 4: Like and Dislike Functionality

How to convert time from one timezone to another in PHP

Detect if PHP session exists

Laravel You requested 1 items, but there are only 0 items available

I need to link Google Sheet with my Laravel

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Split a string array into pieces

How to disable only_full_group_by option in Laravel

PHP: How to quickly split a key=value file into associative array

About Contact Privacy policy Terms and conditions