Mailinglisten-Archive |
On 2008-10-22 10:31, Olaf Gleba wrote:
> [...]
> for ($i = 0; $i< count($allboxes); $i++) {
> if ($allboxes[$i]['name'] == $boxes[$i]['name']) {
> $_box = $box['name'].'_copy_of_'.strtolower($allboxes[$i]
> ['page_name']);
> } else {
> $_box = $box['name'].'_nope';
> }
> }
so richtig versteh ichs nicht, aber:
foreach ($allboxes as $key => $dummy) {
if ($allboxes[$key]['name'] == $boxes[$key]['name']) {
// copy
} else {
//
}
}
oder:
foreach ($allboxes as $each_allboxes) {
foreach ($boxes as $each_boxes) {
if ($each_allboxes['name'] == $each_boxes['name']) {
// copy
} else {
//
}
}
}
--
Sebastian Mendel
php::bar PHP Wiki - Listenarchive