PHP Classes

File: helper/wordEnd.php

Recommend this page to a friend!
  Classes of Alexey Starikov  >  PHP Helper Class  >  helper/wordEnd.php  >  Download  
File: helper/wordEnd.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Helper Class
Call helper functions that are loaded dynamically
Author: By
Last change:
Date: 3 years ago
Size: 372 bytes
 

Contents

Class file image Download
<?php
# wordEnd
return function ($num, $str1, $str2, $str3) {
   
$val = $num % 100;
    if (
$val > 10 && $val < 20) {
        return
$str3;
    } else {
       
$val = $num % 10;
        if (
$val == 1) {
            return
$str1;
        }
        elseif (
$val > 1 && $val < 5) {
            return
$str2;
        } else {
            return
$str3;
        }
    }
}
?>

For more information send a message to info at phpclasses dot org.