phpbar.de logo

Mailinglisten-Archive

[php] Re[2]: [php] dreidimensionale Arrays mit Checkboxes

[php] Re[2]: [php] dreidimensionale Arrays mit Checkboxes

Nikolai Prokoschenko nikolai_(at)_prokoschenko.de
Thu, 10 Aug 2000 12:20:19 +0200


Hello Martin,

Wednesday, August 09, 2000, 11:48:18 PM, you wrote:

>> MB> ist es möglich, dreidimensionale Arrays mit Checkboxen in <FORM> zu
>> MB> definieren?
>> Ich war gestern gerade auf der Suche ;))) Nein, es geht in dieser Form
>> nicht. PHP versteht nur eindimensionale Arrays in <FORM>s. Du musst
MS> Geht nicht? Na dann habe ich ja Glueck gehabt. ;-)
MS> Folgendes funktioniert bei mir bestens:
MS> <input type="text" name="feld[<?php echo $tabelle_nr ?>][<?php
MS> echo $zeile ?>>][<?php echo $spalte ?>]" size="12">

Dann bitte ich dich, deine Kommentare zu
http://www.faqts.com/knowledge-base/view.phtml/aid/119/fid/61/lang/en
zu posten - ich habe mich an den folgenden Text beruht:

MS> PHP does let you collect multiple values from checkboxes in a form using
MS> a single dimensional array.  For example:
MS> 
MS> <input type="checkbox" name="foo[]" value="foo">
MS> <input type="checkbox" name="foo[]" value="bar">
MS> 
MS> But you can't use a multi-dimensional array as the form name.  The
MS> language parser in PHP3 doesn't understand ][ inside a variable name, so
MS> you'll have to think of some other naming scheme (like
MS> variable[$mem_id::$article]) and then parse it on the receiving
MS> end.

Vielleich funktioniert's bei dir, weil du PHP4 benutzst?

-- 
Best regards,
 Nikolai (nikolai_(at)_prokoschenko.de)




php::bar PHP Wiki   -   Listenarchive