Holding an array in a session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have created an array of tables in my database and put it into a session 
using the following code:

  $_SESSION['ses_csv_files'][] = array();
  $qid = mysql_query("SHOW TABLES");
  $num = mysql_num_rows($qid);
  for ($i = 0; $i < $num; $i++) {
   $r = mysql_fetch_array($qid);
   $_SESSION['ses_csv_files'][$i] = $r[0];
  }

I would like to be able to print the current value of the session on various 
pages in my application, however I can only find reference to looping 
through an array in one go. I know I can use next() to increment the pointer 
in the array, is it possible for the session to hold the current pointer in 
the array, if so how can I display its value?

Thanks for any advice offered. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux