I have a loop that calls a function that produces documents, a crap ton of variables and several emails. The loop will go through about 10-20 iterations on average and I am wondering if it calls the functions simultaneously or if it waits until the function is complete before it calls it again.
foreach ($campaign as $key=>$val){
produce_docs($val['id']);
}
function produce_docs(campaign_id){
//Big function
//does not return anything
}