Loading ...
Sorry, an error occurred while loading the content.

Arrays in Session

Expand Messages
  • anees muhammed
    Hi how can we pass an array of elements from one file to another? suppose i have an Array as aray() and i want to keep the whole array in session for getting
    Message 1 of 5 , Aug 3, 2006
    • 0 Attachment
      Hi

      how can we pass an array of elements from one file to another?

      suppose i have an Array as aray() and i want to keep the whole array in session for getting the same later...
      plz help

      Regards
      Anees

      Vinu Thomas <vinuthomas@...> wrote: Anees,

      What would you like do with XML in PHP? If you give us details on what
      you would like to accomplish, we can help you better.

      Regards,
      Vinu
      --- In bang-phpug@yahoogroups.com, anees muhammed <anees_muhd@...> wrote:
      >
      > Hi friends...
      >
      > can anyone tell that how we can integrate an XML file to PHP
      >
      > Regards
      > Anees
      >
      >
      > ---------------------------------
      > Do you Yahoo!?
      > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
      >
      > [Non-text portions of this message have been removed]
      >






      ---------------------------------
      How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

      [Non-text portions of this message have been removed]
    • Vinu Thomas
      Anees, You can pass the array into a session variable. In your next page you
      Message 2 of 5 , Aug 3, 2006
      • 0 Attachment
        Anees,

        You can pass the array into a session variable.
        <?
        session_start();

        $test = array(1,2,4,5,6,7);
        $_SESSION['test'] = $test;
        ?>

        In your next page you should be able to access the array like so:

        <?
        session_start();
        $test = $_SESSION['test'];
        ?>

        As simple as that :)

        Regards,
        Vinu

        --- In bang-phpug@yahoogroups.com, anees muhammed <anees_muhd@...> wrote:
        >
        > Hi
        >
        > how can we pass an array of elements from one file to another?
        >
        > suppose i have an Array as aray() and i want to keep the whole array
        in session for getting the same later...
        > plz help
        >
        > Regards
        > Anees
        >
      • ashok kumar
        Hi Anees, Test2.php as follows ... Click here Test3.php file as
        Message 3 of 5 , Aug 3, 2006
        • 0 Attachment
          Hi Anees,
          Test2.php as follows
          --------------------
          <?php
          session_start();
          $a = array(1,2,3,4);
          $_SESSION['$a'] = $a;
          ?>
          <a href="Test3.php">Click here</a>

          Test3.php file as follows
          ------------------------
          <?php
          session_start();
          foreach($_SESSION['$a'] as $val)echo $val;
          ?>
          This is what exactly You've asked. Write?




          anees muhammed <anees_muhd@...> wrote:
          Hi

          how can we pass an array of elements from one file to another?

          suppose i have an Array as aray() and i want to keep the whole array in session for getting the same later...
          plz help

          Regards
          Anees

          Vinu Thomas <vinuthomas@...> wrote: Anees,

          What would you like do with XML in PHP? If you give us details on what
          you would like to accomplish, we can help you better.

          Regards,
          Vinu
          --- In bang-phpug@yahoogroups.com, anees muhammed <anees_muhd@...> wrote:
          >
          > Hi friends...
          >
          > can anyone tell that how we can integrate an XML file to PHP
          >
          > Regards
          > Anees
          >
          >
          > ---------------------------------
          > Do you Yahoo!?
          > Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
          >
          > [Non-text portions of this message have been removed]
          >






          ---------------------------------
          How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

          [Non-text portions of this message have been removed]






          ---------------------------------
          Here’s a new way to find what you're looking for - Yahoo! Answers

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.