Re: Fatal error: [] operator not supported for strings
| From: | desa15 at necso dot es | Date: | Tue, 19 Aug 2003 08:09:02 +0000 |
| Subject: | Re: Fatal error: [] operator not supported for strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-159994@lists.php.net to get a copy of this message | ||
==
not
=
$_SESSION["id_produs"][]== $_POST["id_produs"];
Un saludo, Danny
"Daniel"
<naspa@profimedia.r Para: php-general@lists.php.net
o> cc:
o>
Asunto: Re: [PHP] Fatal error: [] operator not
supported for strings
19/08/2003 10:06
I checked ant that is not the cause of this problem.
Any other sugesstion?
"John W. Holmes" <holmes072000@charter.net> wrote in message
news:3F40B6A9.6000701@charter.net...
> Daniel wrote:
>
> > hi, how do i solve this error?
> >
> > Fatal error: [] operator not supported for strings
> > in /var/www/html/p.../magazin/cos.php on line
> > 13
> >
> > line 13 is this line:
> >
> > $_SESSION["id_produs"][]=$_POST["id_produs"];
> >
> > no error when i run in local host , when i upload
> > in server (with PHP 4.2.2) only got this error.
> >
> > first time click is fine, but when i click the
> > product once again, i got tat fatal error....how
> > can i solve it?? pls advice. thanks.
>
> Sounds like you've already assigned a value to $_SESSION['id_produs']
> and are now trying to turn it into an array.
>
> $_SESSION['id_produs'] = 'string value';
> $_SESSION['id_produs'][] = 'some other value';
>
> Check your code...
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals ? www.phparch.com
>
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php