Array on external scripts usage
Posted: Thu Nov 02, 2006 6:44 am
feyd | Please use
AnotherScript.php
I would like to use the $data array contents generated on first script as a GET variable in the image generation performed by AnotherScript.php
feyd | Please use
Code: Select all
,Code: Select all
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.Code: Select all
<?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
?>Code: Select all
<?php
$anotherData = $_GET["Data"];
// Some code that uses $anotherData array contents to generate an image.
?>feyd | Please use
Code: Select all
,Code: Select all
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]