ID: 27181 Updated by: [EMAIL PROTECTED] Reported By: admin at kcfreepress dot com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: n/a PHP Version: Irrelevant New Comment:
Thanks for your comments, but this is not the case. :) In general, you must quote the keys used in array operations. If you don't, you'll get a lot of notices when using E_ALL reporting mode. (And you are using E_ALL, aren't you?) So really, the ["key"] notation is correct. [key] is just a hack, and shouldn't be used. ['key'], of course, would be best. =) Previous Comments: ------------------------------------------------------------------------ [2004-02-07 23:18:18] admin at kcfreepress dot com Description: ------------ Quoted from the PHP Manual (CHM file version, generated: Sun Oct 05 02:13:52 2003) ---------- Example 2-7. Printing data from our form Hi <?php echo $_POST["name"]; ?>. You are <?php echo $_POST["age"]; ?> years old. ---------- In order to avoid parse errors, it seems like this should instead read: ---------- Example 2-7. Printing data from our form Hi <?php echo $_POST[name]; ?>. You are <?php echo $_POST[age]; ?> years old. ---------- Thanks! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27181&edit=1
