|
Posted by Toby Inkster on 03/21/06 02:06
wes wrote:
> Can i send an array from one php script to another? If so, how?
Not entirely wure what you're asking, but this might be what you're
looking for...
<?php
// file1.php
$myarray = array(1, 2, 3, 4);
$mystring = htmlentities(urlencode(serialize($myarray)));
print "<a href='file2.php?array={$mystring}'>pass it</a>\n";
?>
<?php
// file2.php
$myarray = unserialize(stripslashes($_GET['array']));
print "<pre>";
var_dump($myarray);
print "</pre>";
?>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|