• 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

php curl requesting twice

PHP only Hit Counter?

Phpunit partial mock + proxy Entity

How can I make Laravel return a custom error for a JSON REST API

Laravel no logout option from menu after successfull login

Merge column values from two arrays to form an indexed array of associative arrays

Custom API and cunsuming in php?

Clients authentication and user authentication with laravel

array_map triple dimensional array [duplicate]

Destroy session upon refresh

Laravel 8 Multiple Relationships for Factory

401 Unauthorized only occurring on some pages in Laravel 8

Wordpress how to get the post thumbnail inside a figure tag

Get keys from associative array [duplicate]

How to get AJAX to post on second page?

About Contact Privacy policy Terms and conditions