Witam...
Mam taki o to sobie skryp w php:
<?php if (count($this->entries)): ?> <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>
<tbody class="body
<?php echo $entry['class'] ?
' '.$entry['class'] : ''; ?>">
<?php foreach ($this->entries as $entry): ?>
<tr class="item
<?php echo $entry['class'] ?
' '.$entry['class'] : ''; ?>">
<td class="element">
<?php echo $entry['data']['catalog_klient']['value']; ?></td>
<td class="element">
<?php $pokazdat = $entry['data']['catalog_data']['value']; $pokazdate=date('d-m-Y', $pokazdat); echo $pokazdate; ?></td>
<td class="element">
<?php echo $entry['data']['catalog_plik']['value']; ?></td>
<td class="element">
<?php echo $entry['data']['catalog_material']['value']; ?></td>
<td class="element">
<?php echo $entry['data']['catalog_szt']['value']; ?></td>
<td class="element">
<?php echo $entry['data']['catalog_szerokosc']['value']; ?> m</td>
<td class="element">
<?php echo $entry['data']['catalog_wysokosc']['value']; ?> m</td>
<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 echo $entry['data']['catalog_cena_m2']['value']; ?> zl</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): ?>
<div class="condition">
<?php echo $this->condition; ?></div>
<?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
Ten post edytował ArturMaly 13.07.2009, 16:12:41