Interpretation of variables inside quotes
| From: | Jean Flinois | Date: | Fri, 14 Apr 2000 16:39:18 +0000 |
| Subject: | Interpretation of variables inside quotes | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13562@lists.php.net to get a copy of this message | ||
Hello everyone !
This little prog :
$u[0] = "uval0" ; $u[1] = "uval1" ;
$t[0][0] = "val00" ; $t[0][1] = "val01" ;
$t[1][0] = "val10" ; $t[1][1] = "val11" ;
echo " -$t[0][1]- <br>" ;
echo " -".$t[0][1]."- <br>" ;
echo " -$u[1]- <br>" ;
produces this :
-Array[1]-
-val01-
-uval1-
I would expect the two first lines to be identical, of course ... Is this a
bug ?, a feature ?
It seems that arrays are correctly interpreted inside quotes if they have
only one dimension.
Is there a trick to get more ?
(note: this is with PHP4RC1 as a module of Apache 1.3.9 on Linux)
Thanx in advance for any answer, and apologies if this has been covered
before ...
Jean