hello
mysql table
ID >> Name >> Salary
$row_set << database table information.
my problem is when i use
json_encode($row_set);
the output will be something like this:
[{"0":"1","ID":"1","1":"x","Name":"x","2":"12345","Salary":"12345"}]
i want the results to be something like this
[{"ID":"1","Name":"x","Salary":"12345"}]
how to do that ?
EDIT :: FULL CODE
$result = mysql_query("SELECT * FROM emp");
while($row = mysql_fetch_array($result))
{
$row_set[] = $row;
}
echo json_encode($row_set);