• 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

Mysqli multi query error

PHP Imap , php 7.4.3 on mac osx catalina

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

how to use extended ASCII instead of unicode in PHP

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

passwordless LDAP login and get user information using Kerberos ticket in PHP

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 solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

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

Target Laravelista is not instantiable

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Assign output of PHP function to a variable

Check if my GET request has Header: Token

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

About Contact Privacy policy Terms and conditions