<SIDENOTE TO JAY>
add to your list of potential book topics?:
knowing when to successfully break the rules.
(i.e. when to not follow the standards)
</SIDENOTE TO JAY>
From a php developer point of view there is one
big problem with 'follow the standards' mantra as
far as square brackets go (with regard to use in the
value of name attributes of form fields) ...
namely if you following the standard you can't use
the array translation capability of php with regard to
incoming request variables.
here is a url from a CMS of mine:
/manager.php?e[n]=article&e[kf][ARTICLE_ID]=186&e[f][n]=bundles&e[f][kf][BUNDLE_ID]=12427&e[f][f][n]=bundledarts&e[f][f][kf][BUNDLE_ID]=12427&e[f][f][kf][BUNDLED_ID]=477&a=2
it's dynamically generated and uses a nested array structure
to describe a 'path' to whatever entity (or list of entities) is being
requested (list, edit, etc) -- it works, it's flexible and
I wouldn't have a clue where to start refactoring this so that
the square bracket 'magic' is no longer required.
David Dorward wrote:
--- Kim Christensen <kim.christensen@xxxxxxxxx> wrote:
On 2/21/06, Jochem Maas <jochem@xxxxxxxxxxxxx>
wrote:
Kim do the escaped sqaure brackets work in
all majors browsers as far as you know?
"Major browsers" as in Firefox and IE for PC/Mac
works great, yes -
Many browsers are amazing at being able to compensate
by errors made by authors, but that shouldn't be taken
as an excuse to not treat the errors as anything other
than something that should be fixed.
You can't test in every browser out there - there are
too many. You can't test in any browser that hasn't be
written yet.
Writing code that ignores the standards is just asking
for maintainance headaches and other troubles down the
line.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php