[nycphp-talk] need help understanding parsing difference
Brian Pang
bpang at bpang.com
Tue Nov 4 14:03:32 EST 2003
I think in both instances you _should_ put $j in quotes since you are
going after the associative key/label.
why it works in the second and not the first? not sure.
> When $PRODUCTS[$here]["v1b"]="holster"
> and $j="v1b"
> echo "<a href=\"path/$PRODUCTS[$here][$j]\"... evaluates to
path/Array[v1b]
> which is meaningless
> but echo "<a href=\"path/".$PRODUCTS[$here][$j]."\"... evaluates to
> path/holster which is correct (or to be more precise, what I wanted).
> Why this difference? Thanks in advance.
>
More information about the talk
mailing list