ballhogjoni Posted October 29, 2008 Share Posted October 29, 2008 I have the object $oCart and I want to add a property to it. This does not work. Can someone show me what I am doing wrong? AddVoucherRecipient is a new index in the properties array. $oCart->properties['AddVoucherRecipient'] = $bAddVoucherRecipient; properties is an array in the object. Link to comment https://forums.phpfreaks.com/topic/130600-how-to-add-something-to-an-object/ Share on other sites More sharing options...
trq Posted October 29, 2008 Share Posted October 29, 2008 Were going to need to see the relevent parts of the class. Link to comment https://forums.phpfreaks.com/topic/130600-how-to-add-something-to-an-object/#findComment-677547 Share on other sites More sharing options...
ballhogjoni Posted October 29, 2008 Author Share Posted October 29, 2008 I don't have any methods that would add this to the properties array. I just thought it may be possible to add an index to an array like my example. Link to comment https://forums.phpfreaks.com/topic/130600-how-to-add-something-to-an-object/#findComment-677555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.