Quote (Minkomonster @ Feb 21 2014 12:22pm)
Pass by reference passes in the address where that variable is stored. It means any modifocations done to it will be directly done to the value stored at the address. Pass by value passes a value which is then stored in local scope. So I just don't understand why you pass the data array in as reference, one because arrays are always pass by reference anyways, and two because you end up returning the array anyways. One of these operations seems unnecessary. And I am still not following what an array of processed data is used for
I didn't know arrays were defaultly passed by reference. In reality I could just use the one array, with a getter and setter, and do what I'm doing without any problem. I guess you can look at the $data array as an entry point for the data and the $processedData array as an exit point for said data; though it's seemingly unnecessary now that I think of it -.-
Also I noticed this completely breaks if any of the data is empty and provides no way of knowing which one it was... I guess I'm already making sure, on the client side of things, that all fields are required, so in this case I'm doing one check too many I guess.
Quote (NinjaSushi2 @ Feb 21 2014 01:55pm)
You came to the right place. These guys and gals (whichever you may be) have been very helpful since I started school a few years ago. There used to be a few bad apples who would run people out of the forum but it's been cleaned up and the help is solid, top notch advice from what I've read and seen from them. (Take that opinion with a heavy grain of salt as I myself am still learning.)
Edit: damn phone did it again.
Yeah I got some great advice on an earlier thread of mine and I figure this is way that not only I, but others can learn from as well ^^
I should get started on that android game too -.-