PHP code example of uluumbch / weight-conversions
1. Go to this page and download the library: Download uluumbch/weight-conversions library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
uluumbch / weight-conversions example snippets
$convert = new Uluumbch\WeightConversions();
echo $convert->poundsToKilograms(1); // 0.45359237
echo $convert->kilogramsToPounds(1); // 2.204622621
echo $convert->gramsToOunces(1); // 0.0352739615
echo $convert->ouncesToGrams(1); // 28.349523125
echo $convert->stonesToPounds(1); // 14
echo $convert->poundsToStones(14); // 1