Re: Printing variables (newbie question)
| From: | David Robley | Date: | Tue, 22 Aug 2000 05:10:56 +0000 |
| Subject: | Re: Printing variables (newbie question) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12883@lists.php.net to get a copy of this message | ||
On 21 Aug, Brian Rue wrote:
> Hi,
>
> I'm having trouble here.
> When using:
> for ($i =0;$i<$some_value;$i++) {
> echo "text$some_var[$i]";
> }
> it only outputs the word "text".
>
> What am I doing wrong?
>
> Thanks,
> Brian Rue
Use
echo "text" . $some_var[$i];
Only 'simple' variables are expanded in double quotes
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA