Re: Header() variables TYPO, eratta

From: Date: Thu, 10 Apr 2003 09:46:08 +0000
Subject: Re: Header() variables TYPO, eratta
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-143298@lists.php.net to get a copy of this message
In last message I've made a typo: --------------- $myArray("index1" => "1st element", "index2" => "2nd element", etc.....) ------------- supposed to be: $myArray=array("index1" => "1st element", "index2" => "2nd element", etc.....) ----- Original Message ----- From: "Alex Ciurea" <alex@netonwave.com> To: "php mailing" <php-general@lists.php.net>; "George Pitcher" <george.pitcher@ingenta.com> Sent: Thursday, April 10, 2003 12:36 PM Subject: Re: [PHP] Header() variables > George, > > This kind of array (key/value pairs) I pass to the target_file and I thought > that this is the reason for my problem, but the same issue occures when I > transmit a simple array. > > > Still, I've tried the serialize() and unserialize() functions. They work > only for simple arrays like > > $myArray=array("1st element", "2nd element", etc....) > > > > If I use a key/value pairs array like > > $myArray("index1" => "1st element", "index2" => "2nd > element", etc.....) > > those functions seems that doesn't work. > > > I'll research further.... :D > > > Thanks alot for your help. > > > ----- Original Message ----- > From: "George Pitcher" <george.pitcher@ingenta.com> > To: "Alex Ciurea" <alex@netonwave.com> > Sent: Thursday, April 10, 2003 12:25 PM > Subject: RE: [PHP] Header() variables > > > > Alex, > > > > You need to parse your array into key-value strings so that you have a > > variable that contains 'key1=value&key2=value and so on. You can then add > > that variable to your header. > > > > Remember that it has to be parsed on the response page. > > > > George > > > > > -----Original Message----- > > > From: Alex Ciurea [mailto:alex@netonwave.com] > > > Sent: 10 April 2003 10:09 am > > > To: php mailing > > > Subject: [PHP] Header() variables > > > > > > > > > Hello, > > > > > > I try to send some variables using the header() function. > > > > > > My code is: > > > > > > header("Location: target_file.php?myVar=".$myVar); > > > > > > It works fine with all types of variables, but not with arrays. > > > > > > If $myVar is an array, the header function will transmit the > > > value "Array". > > > Probably it's normal but is there any way to transmit an array using > this > > > function ?? > > > > > > Thanks alot > > > Alex > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#143298) next »