• 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

nginx err_connection_refused, can anyone help me?

Elastic Beanstalk with Laravel Envoy

PHP - Store information with NO database

Problem with fetching data from database in Laravel

How to install php yaml on CentOs?

How to update array value in Laravel

backup files to google drive using PHP

How to read laravel_session cookies saved in cookie memory of browser in client side?

Form repeater send wrong data with last element in Laravel

Laravel implode array items to new lines

How can I make this nested location configuration use the correct path to call a php program?

Access denied for user 'homestead'@'localhost' (using password: YES)

MySQL - Connection failed: No route to host

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

how to upload binary image to sql server using php laravel

About Contact Privacy policy Terms and conditions