So what I am trying to do is process an array. The array contains one thing: photo urls.
When I use foreach()I get a limit error (500 internal error). It seems that it started happening after I rewrote the script. But that doesnt make any sense as there are no errors in the script and it was working perfectly before. The script still works, it can only process about 30 photos before the error pops up. Is it possible to use while() to process the array? Would it get rid of my 500 error for some reason?
Thanks for the input!
Brandon
If you’re getting timeout (infinite loops) errors, neither while or foreach will do. You’re better off looking at limiting how much your array is processed, and do it step by step (Pagination..?).
if it’s not numeric, use a while with two statements: