PHP Массив
Написать функцию которая на входе получит массив и число, а на выходе тот же массив, в котром каждый элемент будет разделен на это число:
func_diff(&$arr,$del)
Пример входа
&$arr = Array
(
[seo] => 10469
[tools] => 541
[free] => 534
[in] => 528
[for] => 484
[wordpress] => 472
[best] => 456
[joomla] => 443
[software] => 406
[services] => 358
[google] => 331
[оптимизация] => 273
[сайта] => 261
[company] => 260
[optimization] => 251
[tool] => 251
[website] => 229
[plugin] => 227
[для] => 227
[marketing] => 219
[download] => 202
[keyword] => 188
[online] => 185
[all] => 183
[one] => 180
[pack] => 169
[продвижение] => 165
)
$del = 10000
после вызова
func_diff($arr,$del)
у $arr изменяться элементы так:
$arr = Array
(
[seo] => 1.0469
[tools] => 0.0541
[free] => 0.0534
[in] => 0.0528
[for] => 0.0484
...
Функция должна работать как можно быстрее и применить преобразование к существующему массиву без дублирования его в памяти..
Должно работать на PHP 5.3
-
126 Задача простая, готов приступить к работе)
Связаться можете со мной через личку, но сети хотите:
Телеграм: +30502843034
-
688 57 0 1 your_function ($arr, $number)
{
$new_arr = array();
foreach ($arr as $key => $value)
{
$new_arr[$key] = $value/$number;
}
return $new_arr;
}
-
798 15 0 Приветствую.
Могу помочь с заданием.
Сделаю сегодня.
Будет работать на PHP 5.3
Current freelance projects in the category PHP
Parser expireddomains.net
113 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 1 day 19 hours back ∙ 48 proposals |
Integration of payment service with Sales Force
70 USD
There is a payment system widget on the site that needs to be integrated with Salesforce so that all required parameters are visible on the Salesforce side. It needs to be done in such a way that all payments and subscriptions are controlled through Salesforce. PHP, Web Programming ∙ 1 day 23 hours back ∙ 40 proposals |
Intercom systems
90 USD
We are looking for an experienced BAS (1C 8.3) programmer to refine a custom configuration for the business processes of our company. What is needed: — Study the current custom BAS 8.3 configuration — Refine and adjust it to our processes — Accounting: clients, contracts,… PHP, Databases & SQL ∙ 4 days 22 hours back ∙ 13 proposals |
Exporting goods from 1C to prom.uaCreate and configure an API export module for products from 1C to the cabinet and to the site prom.ua, rozetka, or another marketplace of your choice, including stock, names, images from 1C, prices, automatic export, automatic updates. PHP, Databases & SQL ∙ 5 days 14 hours back ∙ 21 proposals |
Fix the WPML translation issueThe website has product translation set up through the Advanced Editor. The translations in the editor are correct, but the incorrect text is displayed on the site. If you go to the page editor (in the language we are translating to), that is exactly the text indicated (in… PHP, Web Programming ∙ 6 days 14 hours back ∙ 37 proposals |