giving the total array to another page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
emartens
Forum Newbie
Posts: 2
Joined: Thu Oct 03, 2002 5:39 am

giving the total array to another page

Post by emartens »

I've got a question;

I've declared an array in one page and want to give the total array to another page f.e.

$table=array()
<A target=\"popup\" href=\"popup.php?table=$table;

But when i check $table in the popup.php it's value is "array"

Can this be done?

kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Sure it can. Before placing it in the url implode() it so that it becomes a single string and then use that value in the url - and then explode() it on the new page.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

You can also share arrays in a $_SESSION variable.
Post Reply