Re: A simple problem!
| From: | J. Jones | Date: | Tue, 24 Apr 2001 18:19:47 +0000 |
| Subject: | Re: A simple problem! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50144@lists.php.net to get a copy of this message | ||
On Tue, Apr 24, 2001 at 11:24:26PM +0530, Subodh Gupta wrote:
> Can You figure out the mistake here...??
>
> print <<<EOQ
> <tr>\n
> <td valign=top align=right><b><font
> color="#$colour[$colouroffset]">$name:</font></b></td>\n // The
> problem is here.. the value of $colour[$colouroffset] is not <td valign=top
> align=left><font
> color="#$colour[$colouroffset]">$dbvalue</font></td>\n //
> getting substituted. Can you tell me why??
> </tr>\n\n
> EOQ;
This is more than likely due to the variable being enclosed in ""'s,
although I can't say for sure, as I've never used print() in this manner.
Try adding the '#' to the actual $colour[$colouroffset] value, then simply
replace "#$colour[$colouroffset]" with $colour[$colouroffset].