我有以下数组:$days_involved
, $ticketIds
, $userIds
- 这些可能看起来不像数组,但每个都是类型数组:array('info', 'info_2' ...);
最大大小为1000+
现在我有一个需要票证 ID 和用户 ID 的 sql 函数,该函数被这样调用:$this->models->ticketLabour->getLaborInformation($ticketId, $userId);
(<-- 以下代码示例,返回一个关联数组),所以我想我可以这样做:
$storage = array();
foreach($days_involved as $day){
foreach($ticketIds as $ticketId){
foreach($userIds as $userId){
$storage[$day][$userid][] = $this->models->ticketLabour->getLaborInformation($ticketId, $userId);
}
}
}
在我看来这看起来不错.....直到你运行它......和chrome或apache或两者都严重崩溃......
我该怎么做.....如果我能做到的话....
但在一天结束时,甚至:
foreach($days_involved as $day){
foreach($ticketIds as $ticketId){
foreach($userIds as $userId){
echo "over , and over and, ";
}
}
}
史诗般地粉碎了 chrome 和 apache...(即使有ini_set('max_execution_time', 0);
:)