コード例 #1
0
ファイル: default.php プロジェクト: Rayman/Beursplein-5
  </tr>
<?php 
    $totalValue = 0;
    $stockList = $this->stockList;
    foreach ($this->userStocks as $stock) {
        //get the stock info
        $stockInfo = $stockList[$stock['stock_id']];
        //Update totalValue
        $totalValue += $stockInfo['value'] * $stock['amount'];
        ?>
  <tr>
    <td>
      <?php 
        echo $stock['amount'];
        echo ' x ';
        echo JHTML::Image($stockInfo['image'], $stockInfo['name'], array('height' => 20));
        echo " " . $stockInfo['name'];
        ?>

    </td>
    <td>
      <?php 
        echo $stockInfo['value'];
        ?>
    
    </td>
<?php 
        //Verandering
        //Color
        if ($stockInfo['change'] > 0) {
            $color = "green";