What I think is that you want to display dropdown list values from database . If that's the case , then here is the solution :-
function get_countries(){
$sql_get_countries = "select *
from ".main::$db_countries."
where continent_code = '".$_SESSION['continent_id']."'" ;
$res_get_countries = mysql_query ($sql_get_countries) ;
if (mysql_num_rows ($res_get_countries) > 0){
$i = 0 ;
while ($row_get_countries = mysql_fetch_object ($res_get_countries)){
$tmp = array(
'name'=>$row_get_countries->name,
'number'=>$row_get_countries->number
);
$this->get_countries[$i++] = $tmp ;
}
}
return $this->get_countries ;
}
Here the country table has continent code in it .
Now the front-end:-
$country_array = $mp->get_countries() ;
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Country<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control" id="country">
<option value="0">Choose Country</option>
<?php
foreach($country_array as $key=>$val){
?>
<option value="<?=$val['number'];?>"><?=$val['name'];?></option>
<?php
}
?>
</select>
</div>
</div>