• 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

Phpunit partial mock + proxy Entity

Printing more than one array using print_r or any other function in php

PHP mail sending empty mails

How to make autocomplete work in foreach php loop? (vscode, intellisense)

How to get unique slug to same post-title for other time too?

How to convert a carbon into string, to take the date only?

How to identify whether webp image is static or animated?

Composer Script echo

How to get the total hour from starting time to end time in php

Pages are working fine on localhost but not running on the hosting server

Changing font color in javascript

Modify microseconds of a PHP DateTime object

Laravel Multi-language routes without prefix

Insert database rows from columns of data from associative array of indexed arrays

php 7 php.ini upload_max_filesize not working

About Contact Privacy policy Terms and conditions