Re: [PHP] A quesiton about arrays and indexes

2002-03-29 Thread Rasmus Lerdorf
Complex arrays inside quoted strings either need to be escaped with {}'s or drop out of the quoted string to display them. ie. echo "".$week[$i][$j].": ".$week[$i][$k][0].""; or echo "${week[$i][$j]}: ${week[$i][$k][0]}"; -Rasmus On Fri, 29 Mar 2002, David Johansen wrote: > Ok, I have a que

Re: [PHP] A quesiton about arrays and indexes

2002-03-29 Thread Miguel Cruz
On Fri, 29 Mar 2002, David Johansen wrote: > Ok, I have a question about arrays and indexes. Something weird happens when > I try this: > > echo "week[$i][$j]: $week[$i][$k][0]"; If you're array subscripts inside "double quotes", then use {braces} around the entire variable: echo "week[$i][$

[PHP] A quesiton about arrays and indexes

2002-03-29 Thread David Johansen
Ok, I have a question about arrays and indexes. Something weird happens when I try this: echo "week[$i][$j]: $week[$i][$k][0]"; Of course $i and $j have their appropriate values. It just prints out Array[0][4] (0 and 4 being the values of $i and $k, but if I do the code below it works just fine.