RE: Arrays

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

 



Hi Ben,

 Welcome to the wonderful world of PHP.

Working with array in PHP is very easy. A large number of functions are
there.
Please visit the manual
http://www.phpcertification.com/manual.php/ref.array.html

You can move values ( including Arrays) from page to page in session
variables.

But you need to do serialize and unserialize in case of array or object.


Do ::

$val_ar=array("one","two","three");
$_SESSION['val_ar_store']=serialize($val_ar);

Now you can get your array in any page simply

$val_ar=unserialize($_SESSION['val_ar_store']);
Print_r($val_ar);

This process is very simple. Please see manual

http://www.phpcertification.com/manual.php/function.serialize.html

http://www.phpcertification.com/manual.php/function.unserialize.html

Revert back with any other problem.

Zareef ahmed 



-----Original Message-----
From: Ben [mailto:benipmiller@xxxxxxxxxxx] 
Sent: Tuesday, November 09, 2004 4:31 AM
To: php-general@xxxxxxxxxxxxx
Subject:  Arrays


I hope this is not a stupid question, but I am learning how to work with

Arrays, and am having trouble figuring out how to move array values from

page to page and/or store in a db.  Once again, I am new to arrays (and 
fairly new to PHP for that matter), so please don't get too technical in

replies.  Thanks so much for help.

ben 

------------------------------------------------------------------------
--
Zareef Ahmed :: A PHP develoepr in Delhi ( India )
Homepage :: http://www.zasaifi.com

-- 
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