If I have a function in php that creates several arrays of objects from parsing xml, how do I return those arrays as references?
Do I need to call new to allocate the arrays? How do I define them within the function?
function ParseConfig($rawxml, &$configName, &$radioArr, &$flasherArr, &$irdArr)
Sorry, I mean return multiple arrays as parameter references.
what do I do to create the array inside the function? or can I just start using it as an array?
I hadn’t noticed that you edited your question, which changes things entirely. You have two decent options here:
Explicitly change them at the top of the function:
Perhaps this is a good place to introduce an object?