RE: [PHP-DB] Re: Array not supported for strings???
| From: | Ford, Mike [LSS] | Date: | Tue, 08 Jan 2002 13:39:36 +0000 |
| Subject: | RE: [PHP-DB] Re: Array not supported for strings??? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15524@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Andy [mailto:news.letters@gmx.de]
> Sent: 04 January 2002 20:24
> To: php-db@lists.php.net
> Subject: [PHP-DB] Re: Array not supported for strings???
>
> $stmt= "
> SELECT country
> from $DB2.$geo_T1
> where country_code = '$country_id[$i]'
> ";
Well, this should be
where country_code = '${country_id[$i]}'
to be sure of doing what you want.
> > This code:
> > $country[] = $row->country;
> >
> > Creates following error msg:
> > Fatal error: [] operator not supported for strings
Is this error coming from PHP or your database? And does it definitely refer to this particular
line?
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211