Re: [PHP4BETA] Interpretation of variables inside quotes
| From: | Faisal Nasim | Date: | Sat, 15 Apr 2000 06:21:45 +0000 |
| Subject: | Re: [PHP4BETA] Interpretation of variables inside quotes | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13574@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-
:
Wrap around the variable in curly brackets.
$x[0][1] = "faisal";
print "{$x[0][1]}";
Output:
faisal
Enjoy!
Faisal