Новые книги

Из этой книги вы узнаете, что такое дисперсия и стандартное отклонение, как найти t-критерий Стьюдента и U-критерий Манна-Уитни, для чего используются регрессионный и факторный анализы, а также многое и многое другое.

И все это — на простых и понятных примерах из жизни милых и пушистых котиков, которые дарят нам множество приятных эмоций.
With important new revelations into the Russian hacking of the 2016 Presidential campaigns

cite

“[Andrei Soldatov is] the single most prominent critic of Russia’s surveillance apparatus.”

text-author

—Edward Snowden

After the Moscow protests in 2011–2012, Vladimir Putin became terrified of the internet as a dangerous means for political mobilization and uncensored public debate. Only four years later, the Kremlin used that same platform to disrupt the 2016 presidential election in the United States. How did this transformation happen?

The Red Web is a groundbreaking history of the Kremlin’s massive online-surveillance state that exposes just how easily the internet can become the means for repression, control, and geopolitical warfare. In this bold, updated edition, Andrei Soldatov and Irina Borogan offer a perspective from Moscow with new and previously unreported details of the 2016 hacking operation, telling the story of how Russia came to embrace the disruptive potential of the web and interfere with democracy around the world.

A Library Journal Best Book of 2015

A NPR Great Read of 2015

array_chunk

Учебник РНР
Назад Вперёд

array_chunk

(PHP 4 >= 4.2.0)

array_chunk - делит массив на отрезки.

Описание

array array_chunk (array input, int size [, bool preserve_keys])

array_chunk() делит массив на несколько массивов с size количеством значений в них. В конце может получиться массив с меньшим количеством значений. Вы можете получать эти массивы как члены многомерного массива, индексированного числами, начиная с 0.

Установив необязательный параметр preserve_keys в TRUE, вы можете заставить PHP сохранить оригинальные ключи массива ввода. Если вы специфицировали FALSE, будут использованы новые числовые индексы в каждом результирующем массиве с индексированием, начиная с нуля. По умолчанию FALSE.

Пример 1. array_chunk()
$input_array = array('a', 'b', 'c', 'd', 'e');
print_r(array_chunk($input_array, 2));
print_r(array_chunk($input_array, 2, TRUE));

Вывод программы:

Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
        )

    [1] => Array
        (
            [0] => c
            [1] => d
        )

    [2] => Array
        (
            [0] => e
        )

)
Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
        )

    [1] => Array
        (
            [2] => c
            [3] => d
        )

    [2] => Array
        (
            [4] => e
        )

)

Назад Оглавление Вперёд
array_change_key_case Вверх array_count_values