Writing the PHP function of numerical inclination
10 USDСуть:
Вводим число, получаем слово с учетом падежа.
/**
* Склонение числительных
* @param $number — склоняемое число
* @param $type — Падеж / окончание
* @param $uc - с большой буквы или маленькой / по умолчанию с маленькой
*/
function convert_num($number, $type, $uc = false) {
...
}
Результат:
convert_num (1, 1, true); // Первая, если $number = 2 - Вторая, $number = 3 - Третья и т.д.
convert_num (1, 2); // первой, второй, третьей ...
convert_num (1, 3, true); // Первую, Второю, Третью ...
convert_num (1, 4, true); // Первого, Второго, Третьего ...
convert_num (1, 5, true); // Первом, Втором, Третьем ...
convert_num (1, 6, true); // Первый, Второй, Третий ...
Есть исходники, все работает, кроме одного, при вызове функции более одного раза, происходит конфликт + код разбит на несколько частей.
Необходимо написать с нуля, на основе имеющегося кода, максимально упростить, оптимизировать...
Client's feedback on cooperation with freelancer
Writing the PHP function of numerical inclinationI made 5 points. A true special!
Profile deleted | Safe
Freelancer's feedback on cooperation with client
Writing the PHP function of numerical inclinationХороший адекватный заказчик. Отработали проект на 5 с Плюсом.
Profile banned | Safe
-
я не филолог, но думаю, ещё род нужно учитывать при склонении...
в примере, именительный падеж - "Первая"(женский), а винительный почему-то - "Первого" (муж.), а не "Первую" -
Current freelance projects in the category PHP
Admin panel for an article websiteGood day. It is necessary to write an admin panel for a gaming article website (this website - https://themeforest.net/item/goodgames-portal-store-html-gaming-template/17704593) The admin panel should include: 1. **User Management:** - Creating new users. - Editing… HTML and CSS, PHP ∙ 4 proposals |
Laravel + VueJS + InertiaJSGood day, the project is written, it is working and ready to launch. Except for one nuance. SSR(Server Side Rendering) works very slowly, when launching a bot to check the load - the site crashes after 3-4 minutes. If you restart SSR during the check, it works but very slowly.… JavaScript, PHP ∙ 2 proposals |
Change the logic of the promotion 1+1=3Video about what needs to be done https://www.loom.com/share/e73bc4b1b04c49f7b78acf95e9ce7d15?sid=73b5c8ee-c7c5-4518-86ef-acfc7ffda194 In short, the logic of the promotion 1+1=3 needs to be changed. Currently, when adding 2 pizzas of 40cm, a modal pops up where the user can… PHP ∙ 1 proposal |
Integrate 1c and WoocommerceIt is necessary to implement the import of goods from 1C to the Woocommerce website, as well as their updates. An important point is that there are a number of custom meta fields made through ACF, they also need to be imported. Import all media files for the product (Main photo,… 1C, PHP ∙ 1 proposal |
Laravel developer with skills working with SphinxHello, I am looking for a Laravel developer who can help improve the current functionality of one of the projects. Skills in working with Sphinx are important, as well as the ability to work with JS at a more or less basic level. Please specify the cost of 1 hour of your work in… PHP, Web programming ∙ 2 proposals |