|
-
Nov 28th, 2007, 01:51 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Session with Array()
Hi,
Is it possible to carry an Array() with Session from one page to another ? Please show me how ?
Otherwise, is there any alternative of this situation ?
As we do in vb, in module section we declared the array and use it from different forms. In PHP we use Session instead of module. How to implement the same kind of situation in PHP ? Please help.
I will be waiting for the reply.
Thanks a lot.
-
Nov 28th, 2007, 02:54 AM
#2
Re: Session with Array()
$_SESSION['myarray'] = Array(1,2,3,4);
-
Nov 28th, 2007, 03:05 AM
#3
Re: Session with Array()
You can put any variable inside the session array. Just make sure you user session_start(); first. You can retrieve it like you would retrieve another array index.
$array = $_SESSION['myarray'];
-
Nov 29th, 2007, 12:44 AM
#4
Thread Starter
Hyperactive Member
Re: Session with Array()
Thanks a lot VisualAd. Its working file.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|