• 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

I need to link Google Sheet with my Laravel

HTML + PHP + PHPMAILER

How to validate tin and cst using PHP?

Array to string conversion

Get image type from base64 encoded src string

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

Call authenticate manually in router middleware

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

How do I call Validator from a namespace with an already existing Validator class

Combining a describing and one array with data

PHP Warning: Module already loaded in Unknown on line 0

Pagekite error: FAIL: localhost:8080 is down

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

PHP Form Not Inserting

About Contact Privacy policy Terms and conditions