RE: [PHP] Arrays
| From: | Zareef Ahmed | Date: | Tue, 09 Nov 2004 04:27:28 +0000 |
| Subject: | RE: [PHP] Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201587@lists.php.net to get a copy of this message | ||
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@comcast.net]
Sent: Tuesday, November 09, 2004 4:31 AM
To: php-general@lists.php.net
Subject: [PHP] 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