<?php 
/**  * Creates fault detail data as JSON  */    
include_once 'db_functions.php';     
$db = new DB_Functions();     
$users = $db->getStateMaster();     
$a = array();     
$b = array();    
if ($users != false){         
while ($row = mysql_fetch_array($users)) 
{                     
$b["sno"] = $row["sno"];
$b["zone"] = $row["zone"];
$b["state"] = $row["state"];
$b["code"] = $row["code"];
$b["country"] = $row["country"];
       
array_push($a,$b);         
}         
echo json_encode($a);     
} 
?>