note 49370 added to function.define

From: Date: Tue, 25 Jan 2005 21:05:50 +0000
Subject: note 49370 added to function.define
Groups: php.notes 
Request: Send a blank email to php-notes+get-83941@lists.php.net to get a copy of this message
If your oft-used array is already defined, but the key value doesn't start at ['0'], --for example if you need an array of state names conforming to GIS codes, it's far easier to define the array in a low-level class and call it by $classname->states[$STATEID]; than it is to try to define it as a constant or use an function to call it later from a free-standing array. It's also useful to do it this way when all you want to do is recall a fixed array value, but don't necessarily want to hit the database just to get it. ---- Manual Page -- http://www.php.net/manual/en/function.define.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49370 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49370&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49370&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49370&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49370&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49370&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49370&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83941) next »