NYCPHP Meetup

NYPHP.org

[nycphp-talk] Syntax question (was handling forms (relative newbie))

Chris Shiflett shiflett at php.net
Mon Oct 6 16:37:50 EDT 2003


--- Hans Zaunere <hans at nyphp.org> wrote:
> $anarray[elementname];
> 
> assumes elementname as a constant

Hans beat me to it.

Specifically, your syntax declares elementname to be a constant, such as
ELEMENTNUM is in Hans's example:

> define('ELEMENTNUM', 5);

PHP can tolerate your error and continue. But, this is no better practice than
writing broken HTML tables that IE happens to render; it doesn't make them
right. :-)

Chris

=====
My Blog
     http://shiflett.org/
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp



More information about the talk mailing list