php array question

From: Date: Mon, 01 Nov 2004 21:36:28 +0000
Subject: php array question
Groups: php.general 
Request: Send a blank email to php-general+get-200868@lists.php.net to get a copy of this message
Hi, I have a line of php that I don't really understand. foreach($this->orders as $OrderID => $value) { echo $OrderID."<BR>"; $OrderObject =$this->orders[$OrderID=>$value]; echo $OrderObject->OrderID."<--all the same<BR>"; } I know that $this->orders is an array of "order" objects. the result i get from this is: line1. 388<--OrderID. line2. 389<--all the same line3. 389<--OrderID. line4. 389<--all the same I'm really confused about why line 1 and line 3 have different OrderID, but line 2 and 4 have the same... I've been trying to fix this bug for 3 hrs with no luck. Any help would be really appreciated.. Thanks a lot

« previous php.general (#200868) next »