Re: Variable Names
- From: news_yodpeirs@xxxxxxxxxxxx
- Date: Thu, 29 Nov 2007 14:37:57 +0100
The manual says:
In order to use variable variables with arrays, you have to resolve an
ambiguity problem. That is, if you write $$a[1] then the parser needs to
know if you meant to use $a[1] as a variable, or if you wanted $$a as the
variable and then the [1] index from that variable. The syntax for resolving
this ambiguity is: ${$a[1]} for the first case and ${$a}[1] for the second.
Does this help you?
Thomas
.
- References:
- Variable Names
- From: "Shaun"
- Variable Names
- Prev by Date: Re: [PHP] Structured Code vs. Performance
- Next by Date: AW: [PHP] Variable Names
- Previous by thread: Variable Names
- Next by thread: AW: [PHP] Variable Names
- Index(es):
Relevant Pages
|
|