Variable declarations

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    Variable declarations

    Hello,(Im not getting any help from the other php groups)
    I am studying the install/install.php file from phpBB(Forum
    Software).This is the first
    file called when installing phpBB.What I don't understand is the fact that
    the variables are RETURNED before they are initialized.
    Line 33:
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo
    $lang['ENCODING']; ?>">
    Line 299-302:
    // Initialise some basic arrays
    $userdata = array();
    $lang = array();
    $error = false;


    If you would like I can post the file so you don't have to look for it.
    Thanks
    Mike



  • Agelmar

    #2
    Re: Variable declarations

    Mike wrote:[color=blue]
    > Hello,(Im not getting any help from the other php groups)
    > I am studying the install/install.php file from phpBB(Forum
    > Software).This is the first
    > file called when installing phpBB.What I don't understand is the fact
    > that the variables are RETURNED before they are initialized.
    > Line 33:
    > <meta http-equiv="Content-Type" content="text/html; charset=<?php echo
    > $lang['ENCODING']; ?>">[/color]

    Not having the files handy, I'm guessing that they have an include() or
    require() statement somewhere that defines $lang...
    [color=blue]
    > Line 299-302:
    > // Initialise some basic arrays
    > $userdata = array();
    > $lang = array();
    > $error = false;[/color]

    Dont know why you posted these here... just sets $userdata to be an array,
    and sets $lang to be a new array (or, perhaps resets it to be a blank array
    if it was already defined in an include() somewhere...)
    [color=blue]
    > If you would like I can post the file so you don't have to look for
    > it. Thanks
    > Mike[/color]

    Not quite sure what the question is, to be honest. And I don't see any
    return statements anywhere in what you posted.


    Comment

    Working...