Mam taki o to sobie skryp w php:
<table class="catalog_wszystkie" summary="Catalog Items" cellspacing="0" cellpadding="0"> <thead class="header"> <tr> <th class="header">Klient:</th> <th class="header">Data:</th> <th class="header">Nazwa pliku:</th> <th class="header">Material:</th> <th class="header">Szt.:</th> <th class="header">Szerokosc:</th> <th class="header">Wysokosc:</th> <th class="header">Pow. 1szt:</th> <th class="header">Pow.:</th> <th class="header">Cena m2:</th> <th class="header">Cena:</th> <th class="header">Faktura:</th> </tr> </thead> <?php foreach ($this->entries as $entry): ?> <td class="element"><?php $pow1 = $entry['data']['catalog_wysokosc']['value'] * $entry['data']['catalog_szerokosc']['value']; echo $pow1; ?> m2</td> <td class="element"><?php $pow = $pow1 * $entry['data']['catalog_szt']['value']; echo $pow; ?> m2</td> <td class="element"><?php $cena = $pow * $entry['data']['catalog_cena_m2']['value']; echo $cena; ?> zl</td> <td class="element"><?php $faktura = $entry['data']['catalog_faktura']['value']; echo $faktura; ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php else: ?> <?php if ($this->condition): ?> <?php else: ?> <p class="info">Brak wyników.</p> <?php endif; ?> <?php endif; ?>
I chciałbym zsumować wszystkie wartości "$cena" tylko nie wiem jak to zrobić :/
Z góry bardzo dziękuję za pomoc...
Pozdrawiam