Re: Associative arrays in strings
| From: | CC Zona | Date: | Mon, 23 Apr 2001 17:33:30 +0000 |
| Subject: | Re: Associative arrays in strings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49891@lists.php.net to get a copy of this message | ||
In article <4040BBE81A9AD411BD27009027887A7C042C9C@tiger.wild.net>,
Chris.Boget@wild.net ("Boget, Chris") wrote:
> Now, supposing you
> do have error level set to very high, you cannot do this:
>
> echo "Here is a $string, $myArray['joe'] with $alot of PHP $variables";
> (using single quotes)
>
> to stop the error. You actually have to do this:
>
> echo "Here is a $string, " . $myArray["joe"] . " with $alot of PHP
> $variables";
echo "Here is a $string, {$myArray['joe']} with $alot of PHP $variables";
--
CC