• 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

Adding multiple items to WooCommerce cart at once

PHP Find Array Index value in multi-line array

Target class controller does not exist - Laravel 8

Send POST data via raw JSON with Postman

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

WHM Enabling mod_rewrite

401 Unauthorized only occurring on some pages in Laravel 8

find in set in laravel ? example

Generate random username based on full name php

Why does using salted hash on python and php give me different results?

Cant seem to get the Pagination to work on my WooCommerce REST API application?

PHP, how to convert Int value to Week days

PHP and WebView - Cookie doesn't are the same

OAuth2 Token PHP

Stop caching for PHP 5.5.3 in MAMP

About Contact Privacy policy Terms and conditions