Thanks to everyone!!!
I have figured it out...
 
  Anas Mughal <[EMAIL PROTECTED]> wrote: I have a function getRow() that returns a 
new instance
of an object called IvActivity. I insert this new
instance into $list. I need to call getTitle method on
each of the inserted objects. However, I keep on
getting parse error on the line that does the casting.
Please help.


$i = 0;
while ($row = mysql_fetch_array($mysql_result)) {
$instance = $this->getRow($row);
$list[$i] = $intance; 
$i++;
}

// ...

foreach ($list as $item) {
$act = (IvActivity) $item;
echo "item: " . $act->getTitle();
}



(I also tried simple for loop with $list[$i] logic.
Unf, I am not able to cast those objects either.)

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



---------------------------------
Do You Yahoo!?
New! SBC Yahoo! Dial - 1st Month Free & unlimited access

Reply via email to