Ok, so I need to pass an array to another function. So I decided to use serialize. I read in another forum that you must you urldecode and urlencode. So...
<?
if($id == "yes") yes($var);
else no();
function yes($var)
{
$var = urldecode($var);
$temp = unserialize($var);
echo count($temp);
}
function no()
{
$temp = array("1","2","3","4");
$var = serialize($temp);
$var = urlencode($var);
echo count($temp)."<BR><BR>";
echo "<a href=\"$PHP_SELF?id=yes&var=$var\">adfasdfasdfdsf</a><br><br>";
}
?>
Well this script works on my local copy of apache but not on my webserver. Whenever I run it, it just returns a 1 for the yes function and the proper 4 for the no function. Any thoughts?