PHP code example of isimmons / weight-conversions
1. Go to this page and download the library: Download isimmons/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/ */
isimmons / weight-conversions example snippets
use Isimmons\WeightConversions\Weight;
ight::grams($amount)->toPounds();
$pounds_from_kilograms = Weight::kilograms($amount)->toPounds();
echo "$amount grams = $pounds_from_grams pounds." . PHP_EOL;
echo "$amount kilograms = $pounds_from_kilograms pounds.\n" . PHP_EOL;