• 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

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

Laravel Model save() & update() Not Saving

How to convert time from one timezone to another in PHP

Popup Window and PHP form

Backend cannot be reached after Typo3 login screen

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

How to convert binary string to normal string in php

Refresh specific HTML content that retrieves data from MySQL

The sum of the user's points

Apply session id from request header

Pass an image through AJAX [duplicate]

PHP echo values of all sub keys [duplicate]

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

Inserting Country Selection into MySQL PHP [duplicate]

About Contact Privacy policy Terms and conditions