• 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

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

Distribute array row data to make multiple new rows

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

PHP array sort and remove duplicates by two field values

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

Magento 2 - How to add new block to admin panel in product page?

Server-sent events in PHP (without echo or print)

Timber: Single post pagination does not work (wp_link_pages)

Ajax GET request fails in laravel 8

Not able to override collapsible.js in magento 2

How to skip cart page on woocomerce for certain products only?

If you intend you use SMTP, add your SMTP Code after this Line

How can i update or reset my password without entering email field in laravel-8?

PHP: How to solve ob_start() in combination imagepng() issue?

About Contact Privacy policy Terms and conditions