PHP Basics Learning Mode

Consider the following segment of code:

<?php
    define("STOP_AT", 1024);
        $result = array();
    /* Missing code */
    {
        $result[] = $idx;
    }

    print_r($result);
?> 

What should go in the marked segment to produce the following array output?

Array
{
 [0] => 1
 [1] => 2
 [2] => 4
 [3] => 8
 [4] => 16
 [5] => 32
 [6] => 64
 [7] => 128
 [8] => 256
 [9] => 512
}