PHP output desired end depending on the number

The sale of this product is suspended.

Try to search similar items from other sellers.

Sold: 0
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

0
Period
1 month 3 months 12 months
0 0 0
0 0 0
In order to counter copyright infringement and property rights, we ask you to immediately inform us at support@plati.market the fact of such violations and to provide us with reliable information confirming your copyrights or rights of ownership. Email must contain your contact information (name, phone number, etc.)

This website uses cookies to provide a more effective user experience. See our Cookie policy for details.