adam9110 Posted June 10, 2007 Share Posted June 10, 2007 Here is the code which is available in php5 $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); But when i try in pHP4 , get Parse error: parse error, unexpected T_OBJECT_OPERATOR How to modify these code to match PHP4 syntax? Thanks very much.. Quote Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/ Share on other sites More sharing options...
adam9110 Posted June 10, 2007 Author Share Posted June 10, 2007 original code is: function get_parent_supplier(){ if(is_object($this->parent_group)){ if(is_object($this->parent_supplier)){ return $this->parent_supplier; } else { $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); return $this->parent_supplier; } } else { $this->parent_group = new supplier_admin_group($this->supplier_admin_group_id); $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); return $this->parent_supplier; } } Quote Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-271731 Share on other sites More sharing options...
adam9110 Posted June 10, 2007 Author Share Posted June 10, 2007 any help will be very much appreciated... THanks to everybody... Quote Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-271777 Share on other sites More sharing options...
Daniel0 Posted June 12, 2007 Share Posted June 12, 2007 Try $parent_supplier = $this->parent_group->get_parent_supplier(); $this->parent_supplier = new supplier($parent_supplier->supplier_id); Quote Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-273238 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.