• 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

Generate random username based on full name php

How to edit Records using CodeIgniter

Laravel websockets AWS EC2 - Connection failed

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

ldap is missing from system when installing adldap2 in laravel

Yii2 select2 database exception number of bound variables does not match number of tokens

Display a success custom notice after Placing an Order in WooCommerce

get attribute from class not working php 7

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

browsersync doesn't work with XAMPP

Handle error for duplicate entries - PHP/MySQL

PHP - Store information with NO database

GuzzleHttp Hangs When Using Localhost

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Navigation idle on content download

About Contact Privacy policy Terms and conditions