Hi staskoverflow community.
How can i improve next structure of PHP 5 code. A list of models $months (more than 12) $month->days (more than 31)
$day->clients a list of clients $day->someActions a list of actions for $clients
(一) 每一美元客户需要每一笔款项。 因此,我的建筑是:
<?php
foreach($monthes as $month) {
foreach($month->days as $day) {
foreach($day->clients as $client) {
foreach($day->actions as $action) {
$action->run($client);
}
}
}
} ?>
So there are four foreach loops, can i improve this code ?