<?php include("parent/callMe.php"); ?>
<select name="subgroup" id="subgroup" class="select select_add">

  <option value="All">All Level Three</option>
<?php
if($_REQUEST['account_id']!='')
{ 

$m->where("parent_id", $_REQUEST['account_id']);  
$secondLevel = $m->get("eduportal_chart_of_accounts");
if($secondLevel[0]>0){
foreach($secondLevel as $secondLevel_val)
{
if(is_array($secondLevel_val)){
 ?>
  <option <?php if ($_REQUEST['subgroup']==$secondLevel_val['coa_id']) { echo 'selected'; } ?> value="<?php echo $secondLevel_val['coa_id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['account_title'])); ?></option>
  <?php } } } ?>
  
  <?php } ?>
</select>
