List:General Discussion« Previous MessageNext Message »
From:Steve Davies Date:March 22 2005 11:55pm
Subject:Re: Passing Arrays between pages
View as plain text  
Hi Kaan

try

Page 1
$testArray[0] =Apple;
$testArray[1] =Banana;
$testArray[2] =Peach;
$testA=implode("!", $testArray);

echo "<INPUT NAME = \"kcompany\" TYPE = \"hidden\" VALUE=\"$testA\">";

Page2
$testArray=explode("!", $kcompany);
echo $testArray[1];

HTH
Steve





PartyPosters wrote:

>Hello,
>Please can someone tell me how you pass arrays between PHP pages.
>I have tried something like this and have tried many variations of this but
>nothing working yet ;
>
>
>Page 1
>$testArray[0] =Apple;
>$testArray[1] =Banana;
>$testArray[2] =Peach;
>
>echo "<INPUT NAME = \"kcompany[]\" TYPE = \"hidden\" VALUE=\"$testArray\">";
>
>Page2
>echo $testArray[1];
>
>
>Many Thanks.
>Kaan.
>
>
>  
>

Thread
Passing Arrays between pagesPartyPosters22 Mar
  • Re: Passing Arrays between pagesSteve Davies23 Mar
RE: Passing Arrays between pagesJay Blanchard22 Mar
RE: Passing Arrays between pagesMike Johnson22 Mar
  • Re: Passing Arrays between pagesPeter Brawley23 Mar