PHP Classes

Help please!

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Help please!  
Subject:Help please!
Summary:Fatal error: Cannot use string offset as an array in ...
Messages:3
Author:Aziz KURTULUS
Date:2009-12-19 23:26:04
Update:2009-12-23 21:45:32
 

  1. Help please!   Reply   Report abuse  
Picture of Aziz KURTULUS Aziz KURTULUS - 2009-12-19 23:27:39
Hello,

I get following error on my oop php code:
Fatal error: Cannot use string offset as an array in E:\AppServ\www\test9.php on line 478

478. line: $property[$this->id] = $_SESSION[$rid][$id][$pid];

where:

$rid = row id (of html output)
$id = object id
$pid = property id

$this->id format is: 2_16_71 i.e.

$idc = explode("_", $this->id);
(converting strings to integer to leave error message, but sorry)
$rid = intval($idc[0]);
$id = intval($idc[1]);
$pid = intval($idc[2]);

any ideas to prevent this error? Thanks for replies...




There are 2 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.