This is a discussion on Just Learning PHP within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Thanks. This looks like most of what I was looking for, especially on curly braces. Never would have thought to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Thanks. This looks like most of what I was looking for, especially on
curly braces. Never would have thought to look under "strings." At first glance I didn't see an explanation about when and when not to use single quotes around array keys. It gets complicated as array keys are supplied from various sources, i.e. variables, table columns,form attributes, etc. and given where they come from, the quote requirement seems to change. I will keep looking in the article. --Kenoli On Sep 7, 4:08 pm, Ian Hobson <ian.hob...@ntlworld.com> wrote: > Kenoli wrote: > > > I have never been able to derive a consistent rule for either of these > > two constructs. > > > Does anyone know the rules here for when one or the other is required > > or not allowed? > > Hi Kenoli, > > It is explained very well in the manual - with examples. > > The key part about curly braces is here. > > http://www.php.net/manual/en/languag...language.types... > > Regards > > Ian |