- Cell Phones 614
- Editors 252
- Education, Science & Engineering 303
- Games 1650
- Internet 546
- Mobile Software 25
- Multimedia & Graphics 1067
- PC 375
- Programming 347
- C# 77
- Data Bases 119
- PHP 53
- Miscellaneous 98
- Security 1375
- SEO 60
- Utilities 827
PHP output desired end depending on the number
Uploaded: 30.12.2013
Content: dendnya.zip 1,47 kB
Product description
Quite often you can see these phrases: time left to 1 days or before the opening left 2 hours. As it is not looks good and sounds one day or two hours. Especially not right!
I have written a function in php will be able to correct such sloppy. Function select (or choose) Need the end depending on the number and give it to you.
The file denDnya.php are two functions:
1. Function denDnya, which returns an array of words: the day, month, year, hours, minutes and seconds with the right endings depending on the number passed to the function.
2. Universal strEnd, which of the proposed options to select words with a suitable ending, depending on the number.
Additional information
The file has a description of the function and an example.
Unfortunately, I have not been consulted and do not give advice on the implementation of functions in the content management system (CMS). There is no opportunity and time. But they are quite simple to understand why by not difficult.
If you suddenly found a bug, be sure to tell me to fix!
Feedback
0Period | |||
1 month | 3 months | 12 months | |
0 | 0 | 0 | |
0 | 0 | 0 |