Re: [PHP-DEV] PHP 4.2.3 release.
In any case, HTML forms can only create uni-demensional lists. So it only makes sense to ask PHP to put those into uni-dimensional arrays. If you want to put that data into a multi-demnsional array on the server, then you should use deliberate code to do so - not through PHP's (post)list-to-array feature. Mike Hall wrote: Would the select name=fields['tech_id'][] syntax work? That should give an identical array, if I'm seeing what you're doing right. Mike - Original Message - From: [EMAIL PROTECTED] To: Xavier Spriet [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 6:47 PM Subject: Re: [PHP-DEV] PHP 4.2.3 release. Hey, did this ever work at all? AFAIK you can only use [] _once_ to denote it's an array. Derick -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 4.2.3 release.
Hey, did this ever work at all? AFAIK you can only use [] _once_ to denote it's an array. Derick On 4 Sep 2002, Xavier Spriet wrote: Hi Guys, I don't know exactly when you plan to release PHP 4.2.3 as a final release but I believe I just found a bug that I haven't seen reported on bugs.php.net or in any of the php-dev threads, unfortunately, I will not be able to confirm this bug until friday night, time at which I will recompile our development server. The bug concerns passing multi-dimensional arrays in $_POST via form/POST, there is an obvious parsing error on my 4.2.3RC1 that makes it impossible to pass it a multi-dimensional array. e.g. select name=fields[tech_id[]] multiple size=3 option value=testtest/option option value=AdamAdam/option option value=EricEric/option option value=MarcMarc/option option value=DrewDrew/option option value=DougDoug/option option value=XavierXavier/option /select This should give us $_POST[fields[tech_id[0]]], 1, 2, 3, etc... in fact, here is what it gives me: [tech_id[]= string(4) Doug Thanks, Xavier Spriet. [EMAIL PROTECTED] (519)-945-2032 Ext. 233 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php --- Did I help you? http://www.derickrethans.nl/link.php?url=giftlist Frequent ranting: http://www.derickrethans.nl/ --- PHP: Scripting the Web - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net --- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 4.2.3 release.
This is not a bug. Your syntax is wrong. It should be: fields[tech_id][] -Rasmus On 4 Sep 2002, Xavier Spriet wrote: Hi Guys, I don't know exactly when you plan to release PHP 4.2.3 as a final release but I believe I just found a bug that I haven't seen reported on bugs.php.net or in any of the php-dev threads, unfortunately, I will not be able to confirm this bug until friday night, time at which I will recompile our development server. The bug concerns passing multi-dimensional arrays in $_POST via form/POST, there is an obvious parsing error on my 4.2.3RC1 that makes it impossible to pass it a multi-dimensional array. e.g. select name=fields[tech_id[]] multiple size=3 option value=testtest/option option value=AdamAdam/option option value=EricEric/option option value=MarcMarc/option option value=DrewDrew/option option value=DougDoug/option option value=XavierXavier/option /select This should give us $_POST[fields[tech_id[0]]], 1, 2, 3, etc... in fact, here is what it gives me: [tech_id[]= string(4) Doug Thanks, Xavier Spriet. [EMAIL PROTECTED] (519)-945-2032 Ext. 233 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 4.2.3 release.
Would the select name=fields['tech_id'][] syntax work? That should give an identical array, if I'm seeing what you're doing right. Mike - Original Message - From: [EMAIL PROTECTED] To: Xavier Spriet [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 6:47 PM Subject: Re: [PHP-DEV] PHP 4.2.3 release. Hey, did this ever work at all? AFAIK you can only use [] _once_ to denote it's an array. Derick -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 4.2.3 release.
Beat me to it! :-) - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Xavier Spriet [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 6:50 PM Subject: Re: [PHP-DEV] PHP 4.2.3 release. This is not a bug. Your syntax is wrong. It should be: fields[tech_id][] -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 4.2.3 release.
my bad... it was indeed a user error... Thanks everyone ;) On Wed, 2002-09-04 at 14:09, Mike Hall wrote: Beat me to it! :-) - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Xavier Spriet [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 04, 2002 6:50 PM Subject: Re: [PHP-DEV] PHP 4.2.3 release. This is not a bug. Your syntax is wrong. It should be: fields[tech_id][] -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php