Ich habe versucht, diese multidimensionale Reihe von Zitaten> Sektionen> Abteilungen Ich habe ein Problem mit der ersten Wiederholung der prefored $ Department-> getActuals();Wie bekomme ich das erste Element Ergebnis in foreach in PHP
$actuals = array();
foreach($quotes as $quoteID => $Quotes) {
$invoiceTotal = $Quotes->getInvoicedValue();
if($invoiceTotal['Total'] > 0) {
$labourCost = 0;
$actualHours = 0;
$sections = $Quotes->getSections();
foreach ($sections as $Sections) {
$departments = $Sections->getDepartments();
foreach($departments as $Department) {
$actuals = $Department->getActuals(null, null, false);
Console::Log('actuals', $actuals);
}
}
}
}
Konsole :: Log ('actuals', $ actuals);
Danke
Was ist das Problem? – gview
@gview Entschuldigung für die verspätete Antwort. Ich kann nicht die erste Iteration der prefored $ Abteilung bekommen. $ tatsächliche Variable, wenn getröstet gibt mehrere Ergebnisse. 'code' Konsole :: Log ('actuals', $ actuals); 'code' ' code' $ actuals = $ Abteilung-> getActuals (null, null, false); 'code' Vielen Dank im Voraus – drakogemini2
Ich habe keine Ahnung, was du meinst. Ist $ actuals ein Array? – gview