Hi there guys,

Who's awake today then? :) What I'm trying to do is create variable
variable arrays and then fill these arrays with values. The problem I
have though is that the values don't appear to be getting stored - as
following the assignment I have outputted a 'sizeof' command which
always outputs 0.

Here's a snippet of the code. Any ideas guys???

//store children page_IDs into array for each parent
$str_array = "menu_array_" . $current_parent_page_ID;
$$str_array = array();

for ($child_cnt = 0; $child_cnt < $number_children; $child_cnt++)

    //get page_ID value
    $page_ID = $db_help_structure->return_single_result('page_ID');

    //$page_ID is now set

    echo "storing in $str_array position $child_cnt:" . $page_ID .
    $$str_array[$child_cnt] = $page_ID;
    echo "size:" . sizeof($$str_array) . "<br>";


Reply via email to