That's done the trick. More coffee for me I think :) Cheers Jason.

Jason Wong wrote:

> On Friday 11 January 2002 20:02, Neil Freeman wrote:
> > Hi there guys,
> >
> > Who's awake today then? :)
>
> Someone isn't :)
>
> > 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++)
> > {
> >     $db_help_structure->next_record();
> >
> >     //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 .
> > "<br>";
> >     $$str_array[$child_cnt] = $page_ID;
> >     echo "size:" . sizeof($$str_array) . "<br>";
> > }
>
> You need to resolve the ambiguity in your code by placing braces around the
> variable part of the variable variable (!)
>
>  ie: ${$str_array}[$child_cnt] = $page_ID;
>
> See manual for details. See the annotated online manual for more examples.
>
> hth
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Go out and tell a lie that will make the whole family proud of you.
>                 -- Cadmus, to Pentheus, in "The Bacchae" by Euripides
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> ***************************************************************
>  This message was virus checked with: SAVI 3.52
>  last updated 17th December 2001
> ***************************************************************

--
--------------------------------
 Email:  [EMAIL PROTECTED]
         [EMAIL PROTECTED]
--------------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to