note 41025 added to language.variables.external

From: Date: Sat, 27 Mar 2004 04:48:58 +0000
Subject: note 41025 added to language.variables.external
Groups: php.notes 
Request: Send a blank email to php-notes+get-67219@lists.php.net to get a copy of this message
When dealing with form inputs named_like_this[5] and javascript, instead of trying to get PHP to do something fancy as mentioned below, just try this on the javascript side of things: <form name="myForm"> <script> my_fancy_input_name = 'array_of_things[1]'; /* now just refer to it like this in the dom tree document[myForm][my_fancy_input_name].value etc*/ </script> <input type="text" name="array_of_things[1]" value="1"/> </form> No fancy PHP, in fact, you shouldn't need to change your PHP at all. ---- Manual Page -- http://www.php.net/manual/en/language.variables.external.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41025 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41025&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41025&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67219) next »