PHP code example of hivokas / correct-word-form
1. Go to this page and download the library: Download hivokas/correct-word-form 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/ */
hivokas / correct-word-form example snippets
php
for ($i = 0; $i < 5; $i++) {
$amount = rand(-20, 200) / 2;
echo $amount . ' ' . Hivokas\CorrectWordForm\CorrectWordForm::ru($amount, 'яблоко', 'яблока', 'яблок') . PHP_EOL;
}
php
for ($i = 0; $i < 5; $i++) {
$amount = rand(-20, 200) / 2;
echo $amount . ' ' . Hivokas\CorrectWordForm\CorrectWordForm::en($amount, 'apple', 'apples') . PHP_EOL;
}