6 cze 2008

Wypełnienie tablicy parami liczb

$data = array_combine( range(0, 100, 10), range(0, 100, 10));
print_r($data);

Array
(
    [0] => 0
    [10] => 10
    [20] => 20
    [30] => 30
    [40] => 40
    [50] => 50
    [60] => 60
    [70] => 70
    [80] => 80
    [90] => 90
    [100] => 100
)