GT COMMUNITY

 

{source}
<?php

// Get a database object
$db =& JFactory::getDBO();
$query = "SELECT * FROM fbk_shareprices order by postedDate desc";
$db->setQuery($query);

$rows = $db->loadAssoc();
foreach ($rows as $key=>$value){
 Â Ã‚ Ã‚ $key = strtolower($key);
 Â Ã‚ Ã‚ $$key = $value;
}
?>

<ul>
<li class="nse">N<span id="price_nse"></span><br/>
<img height="10" src="images/icons/up.png" width="12" alt="" id="up_down_nse" />
<span id="price_percent_nse"></span></li>

<?php
$query = "SELECT * FROM fbk_gdr order by date desc";

$db->setQuery($query);

$rows = $db->loadAssoc();
foreach ($rows as $key=>$value){
 Â Ã‚ Ã‚ $key = strtolower($key);
 Â Ã‚ Ã‚ $$key = $value;
}
?>

<li class="lse">$<?php echo $price;?> <br/>
<?php

if($incr >= 0) {
?>
<img height="10" src="images/icons/up.png" width="12" alt="" />
<?php
}else if($incr < 0) {
?>
<img height="10" src="images/icons/down.png" width="12" alt="" />
<?php
}
?><span>
<?
 Â Ã‚ Ã‚ echo $percentincr;
?>%</span>
</li>
</ul>
{/source}