$d = array();


$rooms=mysql_query("select * from room "); 
                                while($row=mysql_fetch_array($rooms))
                                {  $roomname=$row['name'];
                                                                           $rprice=$row['price'];

$d[] = array('name' => "$roomname" ,'rate' => "$rprice");

}
$json = json_encode($d);

Recent Comments

0 Comments

Sign In To Leave a Comment

Type your Comment below and click to send comment

error: function(jqXHR, textStatus, errorThrown) { alert(errorThrown); }