I have a PHP file that uses the NuSOAP toolkit to connect to an API and return records that I then write to a local database. I'm getting memory errors long before every record is returned.
The first problem - I'm not awesome at PHP.
I've read about foreach loops not being memory friendly and that I should be using for loops instead. But (referencing 'the first problem'), I need a little help.
Anybody want to help me get this file to run without throwing memory errors (and maybe make it a little more efficient in the process)?