| 
	
 | 
 Posted by Steve on 03/01/07 21:54 
| Thanks again but I can't see any difference when I print out the 
| array.  Here's my code 
| 
|        print "*****************<BR>\n"; 
|        $item1 = new CUserTOCItem(7, 
|                                  "", 
|                                  "ROOT", 
|                                  0, 
|                                  0, 
|                                  1, 
|                                  0); 
|        $item2 = new CUserTOCItem(4, 
|                                  "", 
|                                  "Chapter 1", 
|                                  0, 
|                                  0, 
|                                  1, 
|                                  0); 
|        $a = array(); 
|        $a[7] = &$item1; 
|        $a[4] = $item2; 
|        print_r($a) . "<BR>\n"; 
|        print "*****************<BR>\n"; 
| 
| and the output 
| 
| Array ( [7] => cusertocitem Object ( [m_id] => 7 [m_parent] => 
| [m_title] => ROOT [m_depth] => 0 [m_hidden] => 0 [m_open] => 1 
| [m_order_id] => 0 [m_children_arr] => Array ( ) ) [4] => cusertocitem 
| Object ( [m_id] => 4 [m_parent] => [m_title] => Chapter 1 [m_depth] => 
| 0 [m_hidden] => 0 [m_open] => 1 [m_order_id] => 0 [m_children_arr] => 
| Array ( ) ) ) 
 
dave, you've changed your analogy. go back to creating new obj. directly to  
an array element. what was the *exact* output of the code *i* gave you to  
run?
 
  
Navigation:
[Reply to this message] 
 |