Results 1 to 2 of 2

Thread: use Array in Page 2, but Declared in Page 1

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    use Array in Page 2, but Declared in Page 1

    How is it possible to use an array, say $a in page2 whereas you declared it in page1 ?

    Example:
    --------

    Page 1 -> "main.php"
    action="result.php"
    $a(2)=array("aa","bb");


    Page2 -> "result.php"
    I need to use array $a declared in the main page. Is it possible ? Please show me.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: use Array in Page 2, but Declared in Page 1

    You have to remember that PHP scripts end completely when the output is sent. It's not a persistent running application on the server, it's just executed as needed.

    With that in mind, there are some ways of storing persistent data, such as sessions. Research these.

    Also, can you please go through all the other threads you have opened and mark them resolved as needed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width