<?php
	require "../commonincludefiles.php";
   	$objscholarship = new ScholarshipMgmt();
	$i=0;
	$order_field=" scholarship_id ";
	$order_type=" ASC ";
	$limit="";
	$start="";
	$where="";
	$rs = $objscholarship->getAllRecords($limit,$start,$where,$order_field,$order_type);
	$total = dbRows($rs);
	$objscholarship = array("count" => $total, "data" => array());
	if(dbRows($rs) > 0){
		while($row = dbArray($rs)){
			$temparray["scholarship_id"]  = $row["scholarship_id"];
			$temparray["scholarship_name"]  = $row["scholarship_name"];
			
			$objscholarship["data"][$i] = $temparray;   
			$i++;
		}
	}
	
	echo json_encode($objscholarship);	
?>