You almost got it right. You just missed to initiate the array. Before the for loop, add this
PHP Code:
$my_array = array();
An just in case you didn't know, the "normal" behavior of an array is to start counting from index 0, not 1. So you might want to change the loop to
PHP Code:
for ($i = 0; $i < 10; $i++) { $time = ($i + 1) * 0.5;
Of course your way works aswell, but it's more common to start from 0.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
|