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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I would like to know if a PHP generated array could be used as a POST/GET variable on another script call. Let me explain with an example.
<?php
$data = Array();
// some code that fills in the n-dimension array.
print("<IMG SRC='AnotherScript.php?Data=".$data."'>"); // I would like to use $data as a GET parameter
?>
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
You'll receive the string "Array" with your current code. Typically, if you want to pass array based information to another script via URL you have to write it such that it generates an array on the other side.
Thanks for your answer.
I founded this solution but I suppose that you'll agree with me that when this array is really big (I'm managing near 100 matrix elements) it could be unmanageable on both scripts.
Is this the only way to pass arrays between scripts using URL?
I thought that, as a multi choince combo box form control generates an array that could be passed to the PHP script, this other way to work could be possible.
like you said size could be the problem here with a few elements i dont think this would be much of a issue but with hundreds of elements it could have adverse effects on your server.