• 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

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

CodeIgniter force_download is not working

Magento 2 - Controller returning blank page

Login if user is active using Laravel Breeze

How do I truncate a decimal in PHP?

301 Redirect to remove query string on homepage only

Hide specific products from unlogged users based in product category in WooCommerce

PHP password_verify

500 (Internal Server Error) with Laravel & Docker [duplicate]

Limit WooCommerce products in cart only from one custom taxonomy

Applying programmatically a coupon to an Order in WooCommerce3

Dynamic dropdown Ajax PHP request

PHPS source file - 403 Forbidden You don't have permission to access this resource

Laravel - Implicit route model binding with soft deleted data

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

About Contact Privacy policy Terms and conditions