hi all;
how can i change the query so that the result will only display the array with value only..?
$query2 = "SELECT * FROM lkp_country";
$result2 = pg_exec($query2);
$total2 = pg_numrows($result2);
while ($row = pg_fetch_array($result2)) {
$arrsu[] = $row["ctry_code"];
$arrsu2[] = $row["ctry_desc"];
}
$strData = '$data=array(';
for($i=0; $i<$total2; $i++) {
$query = "SELECT * FROM adm_student_registered
INNER JOIN adm_student_profile ON adm_student_registered.sreg_stud_profileid = adm_student_profile.stud_profileid
WHERE stud_country = '$arrsu[$i]' ";
$result = pg_exec($query);
$total = pg_numrows($result);
$rows = pg_fetch_array($result);
$strData .= "\"" . " $arrsu2[$i]" . "\"" . ' => ' . $total . ',';
}
$strData .= ');';
eval($strData);
how can i change the query so that the result will only display the array with value only..?
$query2 = "SELECT * FROM lkp_country";
$result2 = pg_exec($query2);
$total2 = pg_numrows($result2);
while ($row = pg_fetch_array($result2)) {
$arrsu[] = $row["ctry_code"];
$arrsu2[] = $row["ctry_desc"];
}
$strData = '$data=array(';
for($i=0; $i<$total2; $i++) {
$query = "SELECT * FROM adm_student_registered
INNER JOIN adm_student_profile ON adm_student_registered.sreg_stud_profileid = adm_student_profile.stud_profileid
WHERE stud_country = '$arrsu[$i]' ";
$result = pg_exec($query);
$total = pg_numrows($result);
$rows = pg_fetch_array($result);
$strData .= "\"" . " $arrsu2[$i]" . "\"" . ' => ' . $total . ',';
}
$strData .= ');';
eval($strData);